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.

Undef entry when trying to use FEE driver after flashing code using the flash API

Other Parts Discussed in Thread: HALCOGEN

Hi,

I am writing a bootloader that uses flash api 2.0.  I also use the FEE driver from Halcogen 4.3 to store information in the FEE bank (specifically a checksum).

 

I am able to write successfully to the FEE area, I'm also able to successfully flash using the api.  However, after I use the flash api to flash a main program, when I try to write the checksum to the FEE area using TI_Fee_WriteSync, I get an undefEntry error.  If I try to write it before using the flash api it works OK.

 

After I do any writing / erasing using the flash api I am flushing the pipeline using Fapi_flushPipeline.

 

Also, I have interrupts explicitly disabled.  If I take out the call to disable them, the TI_Fee_WriteSync call generates a prefetch abort instead.

 

What do I need to do after using the flash api in order to use the FEE driver again?

 

Thanks,

David

  • It seems that re-initializing the TI FEE driver after writing / erasing fixes the issue, but I'm not sure this is the proper way to go.
  • David,

    Did you try the example in HalCoGen? The example file example_TI_Fee_Write_Read.c can also be found in the examples folder: ../HALCoGen/examples

    I see it's polling for a status to be idle before moving on to the next step - are you doing the same?
  • Yes, I successfully ran the FEE example from halcogen and am following the same format in my reads / writes.

    	result = TI_Fee_Read(BlockNumber,BlockOffset, DataBufferPtr,Length);
    	configASSERT(result == E_OK);
    
    	do
    	{
    		TI_Fee_MainFunction();
    		feeDelay();
    		Status=TI_Fee_GetStatus(0);
    	}    while(Status!=IDLE);


     

  • Hi David,

    Ok, that's good. Don't know what's wrong. The only thing to do is to start backtracking through the exception to understand why it occurred.

    If you are the the UNDEF exception entry then the LR should tell you where you were trying to execute code from when the exception was triggred. What's this address, and what code is there.

    LR will be +4 or +2 of the instruction that tripped the UNDEF exception so it would be best to list the instruction you think should have executed before LR and then we can determine if this was valid or not.