This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using inline assembler code

Hi,

I'm trying to use inline assembler code but the keyword '__asm' is not accepted. I can create an '__asm' function with no compiler warnings but when calling this function the uC restarts.
Using Cortex M3 device.

Regards,

Henk

Parents
  • Hi,

    Executing the flash sequence like unlocking all works fine.
    If I erase some flash section containing code then the verify function shows that code has changed. If I erase the lowest page containing my small test application then is does not start on reset because it is erased.

    When writing data to flash memory the verify function reports that verify is okay, which should not be so if data was really written to flash.

    This is my write function:

    void vWriteAddressX16BitsValueY(int iAdd,short sDta){
      //var
      short* sp;
      //select address
      sp=(short*)iAdd;
      //write data
      *sp=sDta;
    }
    

    Checking some flash write error bit shows that no error occured. But as said: no dat is written.

    Henk

Reply
  • Hi,

    Executing the flash sequence like unlocking all works fine.
    If I erase some flash section containing code then the verify function shows that code has changed. If I erase the lowest page containing my small test application then is does not start on reset because it is erased.

    When writing data to flash memory the verify function reports that verify is okay, which should not be so if data was really written to flash.

    This is my write function:

    void vWriteAddressX16BitsValueY(int iAdd,short sDta){
      //var
      short* sp;
      //select address
      sp=(short*)iAdd;
      //write data
      *sp=sDta;
    }
    

    Checking some flash write error bit shows that no error occured. But as said: no dat is written.

    Henk

Children