Report
5 days, 8 hours ago.

PWM on nRF52 (uBlox Nina-b1)

Hi,

I need PWM for a project I am using the uBlox nina-b1 module on. Anytime I try to load a code that uses PwmOut the module freezes. From what Ive read in the forum it seems like there is some issue with mbed and the nRF timers . Is there a good way to get around this? Maybe using a lower level call the nordic SDK functions? Any help would be greatly appreciated.

Thanks, Calvin

Comment on this question

1 Answer

1 day, 8 hours ago.

Hi Calvin,

What version of Mbed are you using?

A problem impacting the PWM on v5.9.1 and later was recently identified for the Nordic nRF52 family and you might be hitting the same issue. A pull request (which also fixes another PWM issue) is under review, please see:

If you are using v5.9.1 you can try to use this commit if you can't wait for the review:

-Ralph, Team Mbed

Note: Post updated to include screen capture:

/media/uploads/RalphF/onlinecompiler-switchosrevision.png

Thanks for getting back to me Ralph.

I am using the online compiler (not sure how to check version number). I see 1.10.14.0 in the top corner but that doesnt seem like the right number format. I updated all the libraries/docs for my project and the program still hangs when I try to use PwmOut.

posted by Calvin Bond 13 Aug 2018

Hi Calvin,

If you are using the Online Compiler try reverting back to Mbed OS v5.9. I will update my original post to include a screen capture which shows how to do this. In summary, the steps are:

  • Select mbed-os in the Program Workspace
  • Select Revision from the top menu
  • Select mbed-os-5.9.0 from the top table (the screen capture shows v5.9.1 being selected)
  • Right-click mbed-os-5.9.0 and select "Switch working copy to this revision"
  • De-select Revision to return to the Program Workspace code view

Note: The selected OS version will show as bold if you want to double-check which is selected

Then you can rebuild your project. Hopefully you'll see the PWM working as expected.

-Ralph, Team Mbed

posted by Ralph Fulchiero 14 Aug 2018

To post an answer, please log in.