Post Go back to editing

Boot Kernel modification for SPI master boot from different address

Hello,

    I am attempting to boot from another location other than 0x00 in Master SPI boot. I am following the instructions detailed in the Note EE-345 "Boot Kernel Customization and Firmware Upgradeability...." Much like the example in the note I have two applications both with boot kernels at addresses 0x000000 and 0x010000. The boot kernel at address 0x000000 has been modified to load the application at 0x010600. Essentially it does not work, I am not sure it typical debugging technics would be helpful here (ie using the catch line jump (pc,0) ). I inserted the SPI code shown in the note in my User_Init section. My gut feeling is that making these SPI changes is somehow tampering with the flow of program data to be loaded.

    I have attached my 369_spi.asm file for USer_Init section review. It follows very closely to the example. If I comment all of the SPI related code out, it will load the application at 0x000600 just fine. This confirms the PLL section is OK.

Thanks,

Glen

369_spi.asm.zip
Parents
  • Hi Glen,

         I went through the  example code you have posted. I could see that the main difference between the example code with the EE-345 and your code are as follows:

    1. Speed is different.

    2. Wait for SPI DMA uses some LEDs to check the state. 

    WAIT_FOR_SPI_DMA:
        SRU(HIGH, DAI_PB16_I);               // Debug LED, turn on   
        ustat1=dm(SPIDMAC);         // Waiting for the DMA to finish
        bit tst ustat1 SPIDMAS;     // Check SPI DMA Status bit
        SRU(LOW, DAI_PB16_I);               // Debug LED, turn on 
        IF TF jump WAIT_FOR_SPI_DMA;// SPIDMAS = 1 when DMA in progress

    Will it be possible for you to move the "SRU(LOW, DAI_PB16_I);" macro call after the If condition check. In case the SRU macro uses some conditional code then the SPI condition might not be same when the condition is tested. If possible, I would also suggest you to test the example code as it is on your board.

    Best Regards,

    Jeyanthi

Reply
  • Hi Glen,

         I went through the  example code you have posted. I could see that the main difference between the example code with the EE-345 and your code are as follows:

    1. Speed is different.

    2. Wait for SPI DMA uses some LEDs to check the state. 

    WAIT_FOR_SPI_DMA:
        SRU(HIGH, DAI_PB16_I);               // Debug LED, turn on   
        ustat1=dm(SPIDMAC);         // Waiting for the DMA to finish
        bit tst ustat1 SPIDMAS;     // Check SPI DMA Status bit
        SRU(LOW, DAI_PB16_I);               // Debug LED, turn on 
        IF TF jump WAIT_FOR_SPI_DMA;// SPIDMAS = 1 when DMA in progress

    Will it be possible for you to move the "SRU(LOW, DAI_PB16_I);" macro call after the If condition check. In case the SRU macro uses some conditional code then the SPI condition might not be same when the condition is tested. If possible, I would also suggest you to test the example code as it is on your board.

    Best Regards,

    Jeyanthi

Children
No Data