View Single Post
Old January 26th, 2015   #1
Junior Member
Join Date: Jan 2015
Posts: 10
Default Request -> Response 2.8ms time requirement and storing parameters in flash


Everything seems to work fine, except for one issue.

When running OLA RDM Tests, my device fails at 6 of total 407 tests.
All these tests involve changing parameters: DMX start address, Factory Defaults, Device Label.

I am implementing RDM Responder using Atmel xMega MCU. For nonvolatile storage of PIDs value (including DMX Start Address, Device Label, Device Hours, Device Power Cycles and some Manufacturer parameters) are stored in controller's flash memory (to be exact, in Apptable section of flash memory).

Here's what I do when SET command received for those PIDs:
2) Turn OFF all interrupts
3) Update parameter value in MCU's flash memory by performing atomic
Erase-Write operation
4) Turn ON all interrupts

The issue is in timings. Each change of any of those parameter value by SET_COMMAND requires reading of page of flash memory, erasing that page of memory (this takes ~4 ms), then writing of page of memory (takes another ~4 ms).

Although, the E1.20 states that maximum time between any Controller:Request and Responder:Response is 2.8 ms. Obviously, it is impossible for my device to comply with this requirement running OLA RDM Tests, because right after SET_COMMAND for any of said PIDs there is GET_COMMAND for that exact PID and for the time of this GET_COMMAND MCU is busy with Erase-Write Flash Memory Page operation, which takes ~8 ms.

Thus, when any command/request follows SET_COMMAND for any of flash-memory-stored parameter earlier than ~10 ms, I fail at responding in required 2.8 ms.

Waiting for no bus activity for 1.25 second and only then perform erase-write flash memory operation doesn't seem as a solution - still no garantees that Controller won't send command or request at any time after 1.25 second.

Maybe I am doing it all wrong and there is some industry approved way of storing parameters values in compliance with 2.8 ms requirement?

How do you usually store parameters in your devices?

Best regards, Alexey Ivakin.
alvangee is offline   Reply With Quote