This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Dear Forum people,
is there a way to have stable UART communication without using interrupts on the MSP430F5529?
I am asking because I am writing my custom BSL due to the fact that the standard bootloader does not support UCA1 and my custom hardware unfortunately does neither support UCA0 nor USB. I do not want to share interrupts with the main program so I am looking into UART wihthout interrupts.
My question is if there is a better way than this blocking method to receive bytes on RX (but without interrupts)?
while ( !(UCA1IFG & UCRXIFG)){
// wait and do nothing else until a byte has been received
}
return UCA1RXBUF;
Best regards,
Wolfgang
That only blocks because of the while.
If you fold the UART check into you main while loop and periodically check it, you can get the functionality you desire. Note that you have to make sure to check it more often than 2 character times, or you might lose characters.
is there a way to have stable UART communication without using interrupts on the MSP430F5529?
I am asking because I am writing my custom BSL due to the fact that the standard bootloader does not support UCA1 and my custom hardware unfortunately does neither support UCA0 nor USB. I do not want to share interrupts with the main program so I am looking into UART wihthout interrupts.
UART and USB can be used without interrupts for stable communication.
If your device have connection over P4 (for BSL) than any peripheral pin can be remapped to any P4 pin.
How can I assure that I check fast enough without using a timer and interrupt? OK, I understand in the main loop it is pretty easy as long as i don't do anything special, but wouldn't i have to spread some function call that checks the UART line over the entire code in order to make sure it is happening often enough?
Can I combine port mapping with the default boot loader from TI? And how would I do that? We are using P4.4 and P4.5. If I can make the default bootload from TI use these pins I think I am also very happy.
Can I combine port mapping with the default boot loader from TI? And how would I do that? We are using P4.4 and P4.5. If I can make the default bootload from TI use these pins I think I am also very happy.
F5529 is factory preloaded with TI HID BSL. You can replace it with default TI UART BSL for this family and I guess at program start map used timer pins (less than 10 lines of code) to available at P4. Just take care to not brick device, because JTAG fuse value is stored in last BSL segment, and with locked JTAG and erratic BSL device can not be recovered.
**Attention** This is a public forum