Other Parts Discussed in Thread: C2000WARE
I have been working on a project where I have added a bootloader on top of the M3 and C28 main programs. The problem I am having is when communicating via UART with another program on my computer.
Currently as it stands the M3 bootloader starts and waits for some time to receive a command via UART from the outside program or times out and jumps over to the other loaded main program via function pointer
When the M3 bootloader receives the command it enters a conditional and responds to the outside program via UART
This part all works fine
Then some functions are moved to execute from RAM via memcpy and a function call to load a new main program
Once entered the function call, UART no longer outputs to the scope like it would in the bootloader to continue communicating with the outside program. The UART registers look fine and seem to have all the right bits on to show UART actively enabled. Although, UARTDR neither in the bootloader or in the function call show anything in the register when going over the UART TX functions.
Some other things I have found that may be related
- Imprecise bus error on SCB_FAULT_STAT register that once I turned of write caching on the ACTLR register revealed a precise bus error that had a verifies address of 0x4000000C which is WDT0 interrupt clear. this is being escalated to a hard fault and puts me in a fault ISR to loop forever.
- When I add an additional while(1) to the function called to load the new program to spam UART writes it essentially causes the program to no longer perform properly up to that point despite the function call being behind a conditional that shouldn't be entered until the outside program sends its command.
I hope this is adequate information, please feel free to ask for anything thing else you feel may help solve this issue.
Thanks,
Steven