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.

TMS320F28335 Flash_erase with SYS/BIOS

Other Parts Discussed in Thread: TMS320F28335, SYSBIOS

Hello,

I have a TMS320F28335 that is running SYS/BIOS  6.34.2.18.

Before I call BIOS_start I am able to read, write, and erase flash.

After I call BIOS_start I am still able to read and write to flash, but when I try to call Flash_erase, the processor hangs.

Any suggestions?

Thanks,

Bruce

 

  • Just an idea,

    if I remember correct the FLASH- API's are very time senstive and disable all interrupts when called to use software based timings. What else is going on in your SYSBIOS after it has been started?  Could it be that there are some active threads in your project, which are based on interrupts and will block/deadlock themself when interrupts are temporarily disabled?  I am also not sure what the BIOS - scheduler itself is doing when the FLASH-API disables the main interrupt switch.

     

     

  • Hi Frank,

    Thanks for the response. After reading through various flash posts yesterday I also thought this must be something to do with interrupts. SYS/BIOS is doing a few other things, I can disable all of those things during this erase operation. When looking through ROV and the execution graph it looks like this erase thread is the only thing running, everything else is idle.

    Flash_erase is called from an SWI, and I have set that SWI to the highest priority (15). I understand that Flash_erase disables interrupts, but when using SYS/BIOS it manages all of the interrupts itself. So I'm not quite sure how the two of these will work together. Do you know if the flash API has been used with SYS/BIOS?

    After starting SYS/BIOS, is there a way to pause it while the flash operations work, and then unpause it when the flash operations a finished. Given the time it takes to erase and write to flash, I would say it is certain that SYS/BIOS's BIOS scheduler or the SYS/BIOS clock function will interrupt it.

    Your thoughts..?

    Thanks,

    Bruce

  • Hi Frank,

    It seems like I have a workaround.

     

    Hwi_disable();

    Swi_disable();

    Task_disable();

    intStatus = eraseFlashSector();

    Hwi_enable();

    Swi_enable();

    Task_enable();

    I was hoping you could comment on the above. Is there a more elegant way to do this?

    Thanks,

    Bruce

     

  • Bruce,

    I was travelling this week so that I could not reply earlier. I would say that your workaround does make sense, I would it do in the same way if I would have to embed FLASH -API functions in SYSBIOS.

    Regards

     

     

  • It seems to work...

    thanks very much for the reply Frank.

     

    Bruce