Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FastPWM MODSERIAL mbed QEI
Diff: main.cpp
- Revision:
- 3:5cb5f0f22c5a
- Parent:
- 2:306998d368fc
- Child:
- 5:f7e4ecadffd2
--- a/main.cpp Mon Jun 11 07:54:25 2018 +0000 +++ b/main.cpp Mon Jun 11 07:58:24 2018 +0000 @@ -431,10 +431,8 @@ NVIC_SetPriority((IRQn)n,1); } //Set out motor encoder interrupt to 1st place priority - NVIC_SetPriority(PORTB_IRQn,0); + NVIC_SetPriority(PORTC_IRQn,0); - - EncoderA.rise(&encoderFunctionA); //Attach interrupts only to rising edge encoder channel A motorPWM.period_us(PWMCYCLETIMEUS); //50 us = 20 kHz mainLoop.attach_us(&loopFunction,LOOPDURATIONUS); //200 us = 5 kHz