Anonymous
now i lost a SENT protocol message
Anonymous
from the second interrupt triggering twice
Talula
They are mostly kept in stack... if you exit from one interrupt it jumps back to older interrupt.
Talula
Interrupts are never triggered twice, unless your code returns to it... they are locked.
Anonymous
So you think 10 cycles to check if something is on buffer is faster than interrupt?
it is quite often most of the time if you even went to your embedded systems lectures they will tell you to do it this way rather then rely on an interrupt
Anonymous
They are mostly kept in stack... if you exit from one interrupt it jumps back to older interrupt.
but if these interrupts require the clock tick these ones are triggered how do you do this?
Anonymous
but if these interrupts require the clock tick these ones are triggered how do you do this?
the only one i found of doing this requires me to use a PIC which has worse PWM then an ARM one
Talula
it is quite often most of the time if you even went to your embedded systems lectures they will tell you to do it this way rather then rely on an interrupt
It's easier to do it without interrupts for sure but if your program is sitting idle doing nothing using manual method is fine, interrupts are used if your device is busy with controlling something important.
Talula
Why would anyone use PWM for ticks?
Anonymous
to prevent nested interrupts
Anonymous
Anonymous
SENT protocol requires the number of ticks between each falling edge
Anonymous
it seems straight forward to use an interrupt for that right?
Anonymous
but then lets say CAN has more priority
Anonymous
and then you are parsing that CAN message
Talula
But that is the best way to do multi tasking, event based programming, what you're saying is forcing your microcontroller to do something it is not suppose to do to run multiple tasks that are actually consuming more time.
Anonymous
when the sent protocol gets 2 falling edges
Anonymous
when you break out of can
Anonymous
you now deal with these 2 falling edge interrupts
Talula
You can make it that it doesn't...
Anonymous
and the number of ticks between them is gonna be less then 100 ticks
Talula
You can write the program that would ignore all the information coming from other interrupt by disabling them when you are handling CAN.
Talula
Nope... disable them when interrupt is called... simple.
Anonymous
Nope... disable them when interrupt is called... simple.
you cannot disable the thing sending the SENT message
Talula
Why should I make a time sharing program that does nothing but bounce back to main time handler, manage my own stacks?
Anonymous
if i did that i would have a bigger issue CAN MESSAGE disable interrupts get falling edge FINISH CAN MESSAGES reenable interrupts get falling edge
Anonymous
now what?
Talula
When you enter CAN interrupt function, you disable global interrupt... execute everything, enable global and return back.
Anonymous
i missed the start of that message for the SENT protocol
Anonymous
and that is all because i stopped interrupts
Talula
No matter what you do, it's going to be same amount of time... or worse...
Anonymous
No matter what you do, it's going to be same amount of time... or worse...
no it will be faster if you just take into account proper sampling timings
Talula
Or you program can keep jumping between two or 3 functions based on time.
Talula
That isn't efficent at least not for CAN.
Talula
Normally most of these things have Buffer...
Talula
And even if you disable the interrupt that doesn't mean you don't keep information in buffer.
Anonymous
Anonymous
there is no buffering for that
Anonymous
like in SENT
Talula
You'll either lose the information if you don't read it or you'll lose CAN or you'll slow down both.
Anonymous
and SENT is pretty widely used but no microcontroller maker has it really built in
Anonymous
and no interrupt for the falling edge
Anonymous
since a falling edge requires a high point and a low point
Anonymous
i can set up one thread to run at 1 khz or something
Anonymous
which will check if a falling edge occured
Anonymous
if it did we take that approximate tick time
Anonymous
as the beginning
Anonymous
in our can interrupt we just send the buffer to a memory in the stack
Anonymous
and raise 1 flag
Anonymous
that flag awakens another thread
Anonymous
that reads and parses the can message
Anonymous
now i did not lose the sent protocol message and i might have slowed down the can message implementation just a bit (less then 1 khz cycle probably)
Anonymous
which makes the thing hit the limits for standard signal processing applications
Talula
Yep whatever you said can be done using Interrupt too...
Anonymous
Yep whatever you said can be done using Interrupt too...
no it literally cannot account for 1 situation
Anonymous
when i am processing the can message
Anonymous
for longer then 100 ticks
Talula
Or if you want to bounce progam from one point to another that is fine too but that is not required... what you're talking about is special case.
Anonymous
and i get 2 different falling edges at that same time
Anonymous
if i disable interrupts during that time
Anonymous
the falling edges are gone
Anonymous
and my checksum is a byte early
Talula
Normally you don't... even if you do there are always buffers... for I2C all microcontrollers that support I2C has buffers.
Anonymous
and i have to disregard that whole problem
Talula
For TTL or Serial... same...
Talula
Yeah but if you need such a quick action on Hall Effect... maybe special case...
Talula
If I delay Hall effect by 2ns... if nothing bad is going to happen it's fine.
Anonymous
hello guys do you know books about zero days
Anonymous
If I delay Hall effect by 2ns... if nothing bad is going to happen it's fine.
no i mean i literally can have a SENT protocol hall effect
Anonymous
which are quite common for PLC use
Anonymous
What is that?
zero days is vulnerabilities
Anonymous
do you understand what is SENT protocol?
Talula
do you understand what is SENT protocol?
Frankly no... never used it.
Anonymous
which are quite common for PLC use
you are you know Siemens for linux
Anonymous
Frankly no... never used it.
https://en.m.wikipedia.org/wiki/SENT_(protocol)