Can store program in OTP?
-
- Member
- Posts: 8
- Joined: Mon Sep 03, 2012 3:40 pm
Can store program in OTP?
I would like to ask, how to store a small program in OTP without SPI-Flash?
-
- XCore Expert
- Posts: 754
- Joined: Thu Dec 10, 2009 6:56 pm
Hi,
You can store application code in the OTP using the xburn tool.
You will also have to blow a fuse to enable the Xcore from booting from the OTP.
After this it will ignore the mode pins for boot source selection!
You can store application code in the OTP using the xburn tool.
You will also have to blow a fuse to enable the Xcore from booting from the OTP.
After this it will ignore the mode pins for boot source selection!
-
- Member
- Posts: 8
- Joined: Mon Sep 03, 2012 3:40 pm
Bianco wrote:Hi,
You can store application code in the OTP using the xburn tool.
You will also have to blow a fuse to enable the Xcore from booting from the OTP.
After this it will ignore the mode pins for boot source selection!
thanks,
All the documents about OTP i had found from www.xmos.com, describe how to use the AES on OTP.
Where can I find some documents or demo code about how to stored application code on the OTP ?
How do I go to modify the boot load on OTP?
-
- Respected Member
- Posts: 318
- Joined: Tue Dec 15, 2009 12:46 am
If you pass a .xe file to xburn then it will burn that executable to the OTP, e.g.
There isn't a separate document describing this but it is mentioned in the xburn command line manual: https://www.xmos.com/xburn-command-line ... ?support=1.
The OTP is only 8KB which limits the image size of the application you put there. If your application is slightly too big you may be able to compress your application so it fits (see https://github.com/xcore/tool_binary_compressor).
Code: Select all
xburn --target-file mytarget.xn myexecutable.xe
The OTP is only 8KB which limits the image size of the application you put there. If your application is slightly too big you may be able to compress your application so it fits (see https://github.com/xcore/tool_binary_compressor).
-
- Member
- Posts: 8
- Joined: Mon Sep 03, 2012 3:40 pm
Thanks for your help.And i will try it.richard wrote:If you pass a .xe file to xburn then it will burn that executable to the OTP, e.g.
There isn't a separate document describing this but it is mentioned in the xburn command line manual: https://www.xmos.com/xburn-command-line ... ?support=1.Code: Select all
xburn --target-file mytarget.xn myexecutable.xe
The OTP is only 8KB which limits the image size of the application you put there. If your application is slightly too big you may be able to compress your application so it fits (see https://github.com/xcore/tool_binary_compressor).
Now,i do not understand the code like:
Code: Select all
#define OTP_PORTS_INITIALIZER \
{ \
XS1_PORT_32B, \
XS1_PORT_16C, \
XS1_PORT_16D \
}
Code: Select all
/// OTP control signals.
enum {
OTP_CTRL_READ = 1 << 0,
OTP_CTRL_STATUS = 1 << 5,
OTP_CTRL_RESET_M = 1 << 13
};
What's the format of the MAC address stored on the OTP?
-
- Respected Member
- Posts: 318
- Joined: Tue Dec 15, 2009 12:46 am
YedongWeng wrote: Now,i do not understand the code like:Is there any documents described these ports?Code: Select all
#define OTP_PORTS_INITIALIZER \ { \ XS1_PORT_32B, \ XS1_PORT_16C, \ XS1_PORT_16D \ }
Where can i find datasheets about these control signals?
There is a 8KB OTP memory connected to each core. Each OTP memory can accessed from its local core using 3 ports. These ports are internal only (so you won't see them in the pinout given in the datasheet) and fixed (so the same 3 ports are always used for accessing the OTP). This initializer gives the resource IDs of the three ports.What's the format of the MAC address stored on the OTP?
Currently the there is no documentation on the OTP interface or the format in which MAC addresses, etc are written. Instead we provide xburn which can be used to write various things to the OTP via JTAG and the sc_otp module which can been used to read out the data written by xburn. Is there something you are want to do that isn't supported by this combination?
-
- Member
- Posts: 8
- Joined: Mon Sep 03, 2012 3:40 pm
Thank you.richard wrote: Is there something you are want to do that isn't supported by this combination?
I want to store some read-only data in the OTP.If i use XBURN to store the data on OTP, and how can i read these data in the application.
-
- XCore Expert
- Posts: 754
- Joined: Thu Dec 10, 2009 6:56 pm
You can look at or use the sc_otp module as Richard has mentioned:YedongWeng wrote:Thank you.richard wrote: Is there something you are want to do that isn't supported by this combination?
I want to store some read-only data in the OTP.If i use XBURN to store the data on OTP, and how can i read these data in the application.
https://github.com/xcore/sc_otp
The static unsigned otp_read_word(otp_ports_t &ports, unsigned address) function in https://github.com/xcore/sc_otp/blob/ma ... rd_info.xc does what you need.