Other Parts Discussed in Thread: TMS470R1B1M
Hi,
first of all, I am pretty new to programming microcontollers as well as C, so please, bear with me ;)
My goal is to write a boot loader for the TMS470R1B1M. For this purpose, I somehow have to erase and programm the flash.
Following the F05 Flash Module Guide I have to start with a Flash_Compat_B on the to be erases sector.
Unfortunately my microcontollers goes to an infinite loop instead of returning a 0 for success or a 1 for failure.
Here is my code:
#includes
int pass; // save failure success
FLASH_STATUS_ST status; // I am not setting any values here as this AFAIK only used to return values to me
FLASH_ARRAY_ST cntl; // I have no idea what I have this for, spec says this is a a base address but I have no idea which one?
UINT32 start 0x00010000; // I am trying to do a compact on Core 0, Sector 1. As my sectors a 64kb or 0xFFFF in size, sector 1 should start at this address
//btw, why is this a UINT32? shouldn't I have a char* (which is a UINT32 itself) for memorey addressing?
UINT32 delay = 12;
//used the highes wait time from spec but lower values lead to the same result
pass = Flash_Compact_B(&start, FLASH_CORE0, FLASH_SECT1, delay, cntl, &status);
//call the function with all the arguments given above
//unfortunately this goes to an infinit loop
Send(pass); //send is one of my functions for seriell communication
I know my information is not that great but I have no idea what I am doing wrong or where I can find additional information to learn how to do it right.
With best regards,
pininety