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

BLE_UART example and UART Driver

Hi good evening,

i am working on a project that requires ble transmission between 2NRF52dks and one of them is connected to a PC and apart from receiving data from another nrf52 and outputting the data serially, I require PWM and UART (using drivers) in order to control a motor RPM speed depending on user inputs, is it possible to combine them all together. I have already coded the pwm and Uart and they work well but i did not integrate this to the ble_app_uart_c and before i do so i wanted to see if it is possible and if so maybe i get some help on how to properly do it.

thanks

best regards

nikolai dimech

also happy holidays to all Slight smile

Parents Reply
  • Hi Nikolai

    Approximately how often do you need to change the PWM frequency?

    Do you only need a single output, or multiple?

    The PWM peripheral is not very well suited for applications where you want to change the frequency rather than the duty cycle, since by default the frequency is fixed and only the duty cycle changes. 

    In this case it might be better to setup a timer module to generate events at your desired frequency, and connect these events to a pin through the PPI and GPIOTE peripherals. 

    Then you simply need to change the compare value of the timer in order to change the frequency of the pin. 

    Best regards
    Torbjørn

Children
Related