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.

CCS/MSP430FR5989: USCI_A0_ISR interrupt doesn't work after jump from bootloader

Part Number: MSP430FR5989

Tool/software: Code Composer Studio

Hi,

Today I discover strangle problem. I use UART0 in bootloader to receive/send data in pooling, I use no interrupts in bootloader code. After the jump to user application code, everything works almost perfectly without mentioned in topic receive interrupt for UART0 which simply not appears. Strangle is that for UART1 and TIMERs etc. interrupts works but only for UART0 doesn't work. I don't want to share any callbacks function between bootloader code and user application code, perfect for me is completely independent software for bootloader and user code. I add only that when I write code without bootloader UART0 receive interrupt works perfectly, so the code is valid. Please give me some hints where to start an investigation.

Thanks

Best Regards

Michal

  • Hi Michal,

    It sounds as though the interrupt enable for UART0 is not being enabled after exiting the BSL. Since the code works when not using the bootloader, I wonder if you are jumping into your application in the wrong location (after UART0 initialization code has not been executed)?

    Can you read the UART0 IE register and transmit out UART1 to view contents?
  • Hi Dennis,

    Value of UCA1IE_H="0x00" UCA1IE_L="0x01" after start user application code and initialized UART0. It seems to be enabled but not works. I do not use any interrupts in bootloader code, all interrupt are disabled, just use pooling procedures. I'm wondering why UART1 works? Where is the difference?

    PS.
    UART0 polling transmission works.

    Regards
    Michal

  • Hi Michal,

    I wanted to see the value of UCA0IE, not UCA1IE.

    Also, are you using your own bootloader or the one pre-programmed into the device?

    I'm also thinking that there may something in the initialization of UCA0 that depends on the state of UCA0's register bits to be in their POR state (power up) . That's why it works with out the bootloader. If the bootloader sets a bit in some UCA0 register that your initialization code does not, this might be a clue. Can you provide a snippet of your code showing how you initialize UCA0?
  • Hi Dennis,

    I found a solution, unfortunately, the simples things seem to be the difficult ones. I forgot to add one simple code line

        __bis_SR_register(GIE);

    That is all. Sorry for a stupid and silly question. In the end, I decided to publicise my bootloader code and simple UART code whit two linker script one for let we say native run and one for bootloader purpose. If You can look on the bootloader code and check if it's correct I will be grateful.

    Links to bootloader code and user application code

    https://github.com/voloviq/msp430fr5xxx.git

    https://github.com/voloviq/msp430fr5xxx_uart0_user_code.git

    Once again thanks

**Attention** This is a public forum