electroRF
Member
Hi guys,
I'd love to get your advises on the following challenge.
The developers would like to print log messages into memory.
I'd need to implement a log_print function, which takes as arguments: UINT16 Header_ID, UINT16* pData, UINT16 len.
This function would write the header + Data + time-stamp into memory.
Later, I'll need to implement a parser, which will take this data and will convert it into text, using a known database.
Several challenges exist (perhaps you come up with additionals?)
1. how to overcome a situation where while message A being sent, an interrupt occurs, and the ISR will print a message B?
in the memory, it will look like that:
Start of Msg A ---> Start of Msg B ---> End of Msg B ---> End of Msg A
How could the parser know to differentiate between Message B and Message A?
I'd like to try to use as little overhead bytes as possible, to spare Cycles and Memory Size. (Due to Real-Time, I can't disable
interrupt while sending a message)
2. When should I read the time-stamp? how to overcome a situation where while reading the timestamp, I get an interrupt?
3. if you're aware of additional challenges that need to be taken care of, please share
Thank you
I'd love to get your advises on the following challenge.
The developers would like to print log messages into memory.
I'd need to implement a log_print function, which takes as arguments: UINT16 Header_ID, UINT16* pData, UINT16 len.
This function would write the header + Data + time-stamp into memory.
Later, I'll need to implement a parser, which will take this data and will convert it into text, using a known database.
Several challenges exist (perhaps you come up with additionals?)
1. how to overcome a situation where while message A being sent, an interrupt occurs, and the ISR will print a message B?
in the memory, it will look like that:
Start of Msg A ---> Start of Msg B ---> End of Msg B ---> End of Msg A
How could the parser know to differentiate between Message B and Message A?
I'd like to try to use as little overhead bytes as possible, to spare Cycles and Memory Size. (Due to Real-Time, I can't disable
interrupt while sending a message)
2. When should I read the time-stamp? how to overcome a situation where while reading the timestamp, I get an interrupt?
3. if you're aware of additional challenges that need to be taken care of, please share
Thank you