Hello,
my program hangs if i use IAP commands ...
But only without debugger. Without Debugger it hangs, and never comes back again
Clock is 120Mhz
MCUXpresso 11.8.1
Debugger j-link
Code :
unsigned int lpc5410x_prepare_sector(unsigned int sector)
{
unsigned int command[COMMAND_LENGTH];
unsigned int result[RESULT_LENGTH];
iap iap_entry = (iap) IAP_LOCATION;
command[0] = COMMAND_PREPARE;
command[1] = sector;
command[2] = sector;
(*iap_entry)(command, result);
printf("The result of prepared sector number (%d) is %d", sector, result[0]);
return result[0];
}
Called from :
int SaveEepromVal(uint32_t Val)
{
uint8_t Data[256];
Data[0] = (uint8_t) (Val & 0xff);
Val = Val >> 8;
Data[1] = (uint8_t) (Val & 0xff);
Val = Val >> 8;
Data[2] = (uint8_t) (Val & 0xff);
Val = Val >> 8;
Data[3] = (uint8_t) (Val & 0xff);
__disable_irq();
Blink() ;
Val = lpc5410x_prepare_sector(7);
Val = lpc5410x_erase_sector(7);
Val = lpc5410x_prepare_sector(7);
Val = lpc5410x_program_sector( BOOT_VAL_ADDR, &Data, 256);
__enable_irq();
return 0;
}
Any Ideas, what the difference with segger j.link and without?
Andreas
Solved! Go to Solution.
Hello,
i found my problem by myself...
It was the printf which causes the crash...
Andreas
Hello @andreasruetten
Without a debugger, which way to communicate with the device for programming purpose?Please present all the specific steps involved.
BR
Alice
Hello,
i found my problem by myself...
It was the printf which causes the crash...
Andreas