Skip to main content
Visitor II
July 25, 2014
Question

ARHS algorithm problem

  • July 25, 2014
  • 2 replies
  • 737 views
Posted on July 25, 2014 at 23:28

Hello everyone,

I am using iNEMO with AHRS algorithm provided by ST. I have noticed that there is a problem about function pointers initialization. These function pointers are used to point the  AHRS algorithm (whose code is not provided by ST). In particular, three instructions are used to execute this algorithm: 

1) // Init the all AHRS parameters

     iNEMO_AHRS_Init(&xSensorData, &xEulerAngles, &xQuat);

2) //update

    iNEMO_AHRS_Update(&xSensorData, &xEulerAngles, &xQuat);

3) // Deallocate memory

    iNEMO_AHRS_DeInit(&xSensorData, &xEulerAngles, &xQuat);

These function pointers are pointing to a part of FLASH memory, but RAM reservation is also required to allocate something used by the algorithm. In fact one has to use the following instructions: 

volatile uint8_t  pcDummyAHRSReserved[AHRS_RESERVED_RAM_SIZE] @AHRS_RESERVED_RAM_START_ADDR;

pcDummyAHRSReserved[0] = 0;

as specified in an ST sample program. But this doesn't work, and I suppose this is beacuse there are problems with memory allocation. Could anyone help me? What should I specify to execute my program correctly? Thank you in advance!

    This topic has been closed for replies.

    2 replies

    Visitor II
    December 16, 2014
    Posted on December 16, 2014 at 01:17

    Hi!

    Have yoy tried to increase the heap memory size?

    Visitor II
    May 20, 2015
    Posted on May 20, 2015 at 22:22

    Hello

    We have the same problem. Have you solved it.