Skip to main content
Visitor II
February 19, 2004
Question

IAP with a ST72F521R9T

  • February 19, 2004
  • 2 replies
  • 787 views
Posted on February 19, 2004 at 12:49

IAP with a ST72F521R9T

    This topic has been closed for replies.

    2 replies

    vianneyAuthor
    Visitor II
    February 19, 2004
    Posted on February 19, 2004 at 11:04

    Hi everyone!!

    I've tried to make an IAP with my ST72F521R9T but it doesn't work...

    Is someone able to help me??

    Here is the sample of code I m using...I use HdFlash.c drivers and ST7 Software library.

    unsigned int *nptest1;

    // nptest1 point on the adress VgenCalib=0x00E001

    nptest1=(unsigned int*) VgenCalib;

    //ucConfig is a value from a dipswitch plug on my ST7 (port B)

    while(~ucConfig&0x40)

    {

    RASS_Disable(0x56,0xAE);

    // The function Vpp_Enable set a bit of a port to ''1''.

    // This value, tanks to a hardware design, force pin Vpp to

    //12-13V

    Vpp_Enable();

    // Write the value 0x19 at the address VgenCalib = 0x00E001

    HDFlashWriteByte(0x19,VgenCalib,1);

    // Thanks to Vpp_Disable function, Vpp pin = 5V.

    Vpp_Disable();

    ucConfig=~PBDR;

    }

    while(~ucConfig&0x20)

    {

    // Display the value on the leds

    LED_vDisplay(*nptest1);

    ucConfig=~PBDR;

    }

    When I measure the value of the Vpp pin, it is equal to 12-13V when the program is in the first loop, and 5V when it is out of the second one.. But the value displayed on the leds is not equal to 0x19 but 0xFF...

    Have I made a mistake in my program or is there something I have forgotten to read in an application note??

    Thanks for answering.

    Best Regards.

    Vianney
    Visitor II
    February 19, 2004
    Posted on February 19, 2004 at 12:49

    Remember you have to erase the sector before you program it.

    What return value are you getting from the ECMD register?

    Regards

    sjo