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.

MSP430FR5992: Hardware configuration (after leaving bootloader)

Part Number: MSP430FR5992
Other Parts Discussed in Thread: UNIFLASH

Tool/software:

Hi,

I am using an SPI bootloader for the MSP430FR5992 processor.

The situation looks like this:
1. I'm uploading the bootloader, using a debbuger or uniflash interchangeably.
2. I upload the application via SPI.
3. I go to the application - the application works properly.
4. I reset the processor by turning off the power and the application starts but does not work properly. This means I cannot set the digital outputs to high and the interrupts do not work. I made sure that interrupts are re-enabled via __enable_interrupt(). I also clear PM5CTL0 &= ~LOCKLPM5;

It looks a bit as if some configuration that is set in the bootloader causes the application to work properly, but the second time after powering up, when the bootloader is bypassed and we go directly to the application, not everything works properly.

For example, if I set the SPI configuration in the bootloader before checking the flag whether the application is available and then enter the application, communication with SPI interrupts works. However, if this configuration is not in the bootloader, the application will not work even though the same SPI configuration is present at the very beginning after application startup.

What could be the problem? I'm running out of ideas :)

Regards

  • Can you make sure "the application starts"?

    Can you debug the bootloader at debug mode and use PC jump into the main function. 

    Please take care on the interrupt table. For MSPM0, as I remember, it doesn't support table shit.

  • Yes, I am sure that app starts. I mentioned above as if I add spi configuration in BSL (and directly go to app), application works. And thats why I am sure that app starts because then I can communicate with it.

  • I think I found the problem. So when I am using API (DriverLib) my app doesnt work properly. And the difference between BSL and my app is that BSL confugure spi port directly through register. So if I configured SPI in BSL directly in register, SPI in my app worked. But THE SAME configuration with DriverLib is not working.

    I used DriverLib once and everything was fine, so I suspect that something broke when updating the environment and transferring the project to a newer version. Any ideas?
    
    
  • Can you check the SPI register setup under debug view. One is with driverlib. The second is register setting.

    To answer your question:

    Maybe with Driverlib, the SPI is not setup correctly. After jumping from BSL to App, it will not erase the register setting. That is why your App SPI can work.

**Attention** This is a public forum