This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Know when the softdevice / Interrupt took control

Hi,

I'm developing a unit which i need from time to time to send a packet throw I/O lines (F.E.virtual uart)

However the packet bit timing is very critical.

As far as i understand, when using a softdevice, the softdevice can interrupt me whenever he needed (& also, other interrupts)

that's ok,  but i need to know that the softdevice interrupted me (or other interrupts occered), ruined my packet timing and i'll take care of it and resend the packet again.

What i thought of is making a flag and check at the end of my packet transmition it's status (if it still 0 - then no interrupt were made)....

So, Where shoud i put the "flag=1" ? is there a centrer place that i can raise this flag and know that the soft device / Other interrupt took control/were made ?

B.R

Yuval

Parents
  • Thanks,

    But this not working for me since i'm the slave and not the master, so i don't know when the other transmitter sends it's data....(And i act according to the data)

    Another question,

    If i set a timer event for every 200 micro seconds, (f.e. Inside the event i have 1 line of code - advancing  a counter)

    How much time will be spent in going into the event, advancing the counter and return back to the regular program?

    B.r, Yuval.

Reply
  • Thanks,

    But this not working for me since i'm the slave and not the master, so i don't know when the other transmitter sends it's data....(And i act according to the data)

    Another question,

    If i set a timer event for every 200 micro seconds, (f.e. Inside the event i have 1 line of code - advancing  a counter)

    How much time will be spent in going into the event, advancing the counter and return back to the regular program?

    B.r, Yuval.

Children
Related