added DigitalSequence and PulseReader#2070
Conversation
lib/digital_signal/digital_signal.c
Outdated
| sequence->sequence[sequence->sequence_used++] = signal_index; | ||
| } | ||
|
|
||
| void digital_signal_update_dma(DigitalSignal* signal) { |
There was a problem hiding this comment.
I know this looks a bit low level.
We also can use a C-only version but then minimum length of a the last pulse in a signal has to be a bit longer.
There was a problem hiding this comment.
I don't think that C version will be slower here. This code is quite straight forward, no special instructions used. Please provide C-version.
lib/digital_signal/digital_signal.c
Outdated
|
|
||
|
|
||
| /* hurry when setting up next transfer */ | ||
| asm volatile("\t" |
There was a problem hiding this comment.
Also thought about using DMAs to automate things, but that would probably occupy all available DMA channels of both DMA.
And even then I am not sure if it would work out.
|
ouch. i guess i know what to do... |
|
Hi @g3gg0 |
|
Ah cool, it seems you are doing PIL tests with a flipper attached? Currently I am trying to get the unit test setup running on my setup. EDIT: dumb question: how to get the debug log in unit_test mode? |
|
Hello @g3gg0 |
|
@gornekich @g3gg0 un-draft when ready. ;-) |
|
shall i change the test files to match either A or (preferrably) B ? |
|
okay i changed the status back to "open" for a review.
|
|
Hi @g3gg0 |
|
no worries. |
|
Great work! 25207 [D][PulseReader] Pulse: 131 I expected to see roughly the same values. Am I wrong? |
|
Also thanks for changing unit tests data. I agree with your solution. Could you also modify build scripts so that PulseReader is build and installed as static library. You can apply the patch attached |
uh thats weird. looks like how did you create the signal? using an external device or with the device creating the signal itself? will try a similar setup. maybe there is something odd due to timer overruns or such... |
|
I just took another flipper and generated signal with Signal generator application. I will check with logic analyzer the signal just to be sure. |
|
Finding: the pulse_reader's first returned signal was a missing edge. fixed that. Adding a note that interrupts must not get disabled when using pulse_reader, as it uses EXTI, Also added a unit test routine, which I am cleaning up right now. |
|
okay, added a unit test, creating different signals using TIM1 that will get read by digital_reader. for this PA6 and PA7 need to get bridged. can you test it if it works for you? |
56e9d19 to
45696f5
Compare
|
Updated f18 api_symbols.csv and rebased on latest dev again. Hopefully the workflows like that better. Will catch up the ISO15693 branch after this is merged prior to un-drafting that PR. |
|
Un-draft when ready. |
|
Also I noticed that mf classic emulation works worse than dev brunch. I will try to figure it out |
wait. you mean that these changes make mf classic emulation worse? |
|
Yes, but it's partially my fault. I have log level set to debug and message "[prepare] pulse_duration out of range" makes timings worse. When I set debug level to info, the emulation is exactly like in dev brunch. Now I want to figure out why we fall in |
|
at some point in time in my dev branches i moved the NfcA code over to the DigitalSequence stuff. |
|
g3gg0@0cb784a |
|
@nvx Sorry for incorrect patch. Please format sources |








added DigitalSequence to chain multiple DigitalSignals
added PulseReader for hardware assisted digital signal sampling
What's new
Verification
Maybe with such a test code? Where to put smth like that?
Checklist (For Reviewer)