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

event TIMER3 CC[x] ->task SEQSTART[0] PWM0 ->event PWMPERIOD->task SAMPLE SAADC

timpwmadc.c It is perfect (wonderfull!) idea to use programmable system PPI (EEP->TEP+FORK) alternative PGA.

But I get some problems:

I tried to program a TIM3 to generate an TIM3_event_ CC[n] (its ok) that would trigger task
NRF_PWM0->TASKS_SEQSTART[0] (dma sequence PWM0 in wave mode with 4 channels).

Then I programmed PPI to connect PWM0_EVENT_PWMPERIODEND to SAADC->TASKS_SAMPLE with DMA.

But when I tried to stop PWM with SHORTS after SEQEND[0] and to change PWM0->COUNTERTOP every time I get an event like NRF_PWM0->TASKS_SEQSTART[0] and so on.

In result | get two PWM sequencies - first when I change PWM0->COUNTERTOP after PWM_STOPPED and second when TIM3_event_ CC[n](always generated). If I not use SHORTS to stop PWM_SEQUENCE, I see regular events PWM0_EVENT_PWMPERIODEND after PWM_SEQUEND[0] until I stop PWM0.

I tried to use SDK11 (NRF52832) functions and tried to use direct access to periferial registers but...

And wishes:

more PPI channels (may be another block of PPI registers), more RTC (low power timers/counters) more serial interfaces (especially UARTs) faster and more accurate ADC with scan all enabled channels on single event, faster core clock - Only real events can require an exact clock

  • EVENT->FAST RESPONSE -> SLEEP(no fast clock at all)
    more RAM and........

You made VERY NICE series of microcontrollers +RADIO

Parents
  • Good day! Thanks for the quick response to my question! In this case, I want to rigidly synchronize the measurement of the current flowing through a full bridge controlled by PWM0 independent of PWMPERIOD>10us and PWMDUTY>=5us and the frequency generation of PWM sequences. Another goal is to completely turn off the PWM and SAADS modules between these PWM sequences in order to save energy Sincerely, Bond.

Reply
  • Good day! Thanks for the quick response to my question! In this case, I want to rigidly synchronize the measurement of the current flowing through a full bridge controlled by PWM0 independent of PWMPERIOD>10us and PWMDUTY>=5us and the frequency generation of PWM sequences. Another goal is to completely turn off the PWM and SAADS modules between these PWM sequences in order to save energy Sincerely, Bond.

Children
No Data
Related