You may had some problem to reflash your TD1208 once you load the blink example or your own code in the device. This is because you need to reset the device to reach the firmware upgrade procedure during boot procedure.
On of the way to do it is to perform a hard reset putting Reset pin to ground during TDLoader Sync process. The other way is to add some lines in your code to create a soft reset. Here is an example on howto do it :
void TD_USER_Setup(void)
{
// Initialize the LEUART
init_printf(TD_UART_Init(9600, true, false),
TD_UART_Putc,
TD_UART_Start,
TD_UART_Stop);
}
void TD_USER_Loop(void)
{
while ((c = TD_UART_GetChar()) >= 0) {
NVIC_SystemReset();
}
}
When the loader is waiting for the bootloader sequence, it send communication over the serial line. In this example, when a such communication is detected, the system is calling a soft reset, starting the boot sequence and as a consequence the firmware upgrade automatically.
Continue reading →
Like this:
Like Loading...