HCS08SGFNVMSSD SGF driver

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HCS08SGFNVMSSD SGF driver

1,733 Views
josehida
Contributor I
Hello,

I'm working in a project with a SRB MC1321X and I need to program the flash. In other thread, I saw HCS08SGFNVMSSD SGF driver and I have integrated this code into my project. The problem is when I use the BDM Multilink step by step the project works correctly, but when I run it in normal mode the MC1321X doesn't reply.
I have configured the clock correctly to have from 150kHz to 200kHz.

Has anybody worked with HCS08SGFNVMSSD? I need help.

My best regards, PEPE
Labels (1)
0 Kudos
4 Replies

382 Views
josehida
Contributor I
Hi again,

Thank you for your help, but before to initialize, erase and program the flash I write the following lines in my code:

    __asm SEI;
    __asm lda   #$33
    __asm sta   SOPT       // ;disable COP

Maybe I don't integrate well the code of HCS08SGFNVMSSD SGF because I load this driver in a 13192 EVB works perfectly then I make a MAC application with Beekit for 1321 SRB or 13192 EVB and I integrate the code in this application, it doesn't run.
Are there any application notes which describes how integrates it?

Regards



http://forums.freescale.com/message?board.id=8BITCOMM&message.id=9084" rel="nofollow" target="_blank
0 Kudos

382 Views
bigmac
Specialist III
Hello Pepe,
 
Keep in mind that the COPE bit within the SOPT register is write once after reset.  If the Beekit code already has written to this register, you won't be able to alter the previous setting.  If this is the case, you will need to change the Beekit code so as to disable the COP facility, or alternatively provide periodic COP timer reset whilst waiting for the flash erase to complete.
 
Regards,
Mac
 


Message Edited by bigmac on 2008-02-14 04:25 AM
0 Kudos

382 Views
bigmac
Specialist III
Hello Pepe,
 
Does your code, presumably the part that runs from RAM at this point, clear the COP timer whilst waiting for an erase to complete?  COP timeout is possible during the erase period, but is prevented from doing so during background debug mode.
 
Regards,
Mac
 
0 Kudos

382 Views
JimDon
Senior Contributor III
Here is a possibility. Do you have interrupts disabled while erasing?
If you don't disable interrupts, it will work while single stepping, but crash when not.
It because the vectors are not available while erasing and if one happens, the machine will crash.


0 Kudos