Author Topic: Saving "printf" arguments for later? Real-time on slow processor.  (Read 3385 times)

macboy and 3 Guests are viewing this topic.

Offline 5U4GB

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: au
The OS and the IPC (interprocess call) scheme handles all of that. Race conditions, data contention, etc. are all completely impossible by design. If I tried to do "something funny" it simply would not compile.

Now I'm really curious, that sounds like a SIL/ASIL x device or similar, are you allowed to share any more details on it?  PM is fine, there's so little published about real-world use of these things that I'm always interested in examples.
 

Online Analog Kid

  • Super Contributor
  • ***
  • Posts: 1160
  • Country: us
More TLAs:
  • SIL: safety integrity level
  • ASIL: automotive safety integrity level

(OK, that last one is a FLA)
 

Offline 5U4GB

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: au
Allocating 10 chunks of memory from the heap and copying/populating the data/fields in only 500 clock cycles seems like it would be hard to do without a lot of consideration.

I like @Analog Kids's suggestion of a circular buffer, if you've got a ton of RAM then just divide it into fixed-size blocks and advance a counter to the next one on each printf call.  Dump the integer values as ASCII ('A' + nibble, one addition op per 4 bits) and postprocess them later into decimal integer values.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf