mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-29 19:20:22 +00:00
Revert "Fixed behavior of the PRCR register. Previous write protection will be recovered."
This reverts commit 4d7296109e31690972d8cf09e6138131938cb0ed.
This commit is contained in:
parent
5c7876d444
commit
385611c5a9
@ -99,10 +99,9 @@ void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer, Stack
|
||||
void vApplicationSetupTimerInterrupt(void)
|
||||
{
|
||||
/* Enable CMT0 */
|
||||
unsigned short oldPRCR = SYSTEM.PRCR.WORD;
|
||||
SYSTEM.PRCR.WORD = (0xA5u<<8) | TU_BIT(1);
|
||||
MSTP(CMT0) = 0;
|
||||
SYSTEM.PRCR.WORD = oldPRCR;
|
||||
SYSTEM.PRCR.WORD = (0xA5u<<8);
|
||||
|
||||
CMT0.CMCNT = 0;
|
||||
CMT0.CMCOR = (unsigned short)(((configPERIPHERAL_CLOCK_HZ/configTICK_RATE_HZ)-1)/128);
|
||||
|
@ -99,10 +99,9 @@ void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer, Stack
|
||||
void vApplicationSetupTimerInterrupt(void)
|
||||
{
|
||||
/* Enable CMT0 */
|
||||
unsigned short oldPRCR = SYSTEM.PRCR.WORD;
|
||||
SYSTEM.PRCR.WORD = (0xA5u<<8) | TU_BIT(1);
|
||||
MSTP(CMT0) = 0;
|
||||
SYSTEM.PRCR.WORD = oldPRCR;
|
||||
SYSTEM.PRCR.WORD = (0xA5u<<8);
|
||||
|
||||
CMT0.CMCNT = 0;
|
||||
CMT0.CMCOR = (unsigned short)(((configPERIPHERAL_CLOCK_HZ/configTICK_RATE_HZ)-1)/128);
|
||||
|
Loading…
x
Reference in New Issue
Block a user