HI.
I'm developing a nRF52 custom board.
I use a Crypto chip, and I have to calculate and store the count value between the Rising Edges.
How should I do it?
Please reply.
HI.
I'm developing a nRF52 custom board.
I use a Crypto chip, and I have to calculate and store the count value between the Rising Edges.
How should I do it?
Please reply.
Using GPIOTE, can I set two pins to detect the Rising edge and start and end with PPI?
Yes, you have 8 GPIOTE channels, so that should not be an issue. Also note that PPI has a fork mechanism, so one event can trigger a second task.
Yes, you have 8 GPIOTE channels, so that should not be an issue. Also note that PPI has a fork mechanism, so one event can trigger a second task.
After checking the code you attached, is it correct to check the Rising edge to Rising edge count with timer_handler_read?
For every transition from low to high, the counter is incremented, and can be read in timer_handler_read().
You might however need to change the argument in GPIOTE_CONFIG_IN_SENSE_LOTOHI() from false to true.
nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(true);
Oh...!
There are a lot of things I don't know.
Thank you for helping me. I'll test the part you've mentioned after I've corrected it.
Handler does not work after timers_init.
timer_cfg.mode = NRF_TIMER_MODE_TIMER
timer_cfg.mode = NRF_TIMER_MODE_LOW_POWER_COUNTER
Is it correct to use these two functions together?
Is it correct to use these two functions together?
No, not for the same timer instance.
I made some adjustment to the example, e.g. added Segger RTT logging. It will count the number of low to high pulses for the duration of 10sec(COUNT_READ_INTERVAL), print the number, then it will restart counting from 0. I tested this with SDK 15.3:
Attachment: gpiote_timer_ppi.zip