mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-15 12:39:50 +00:00
Renesas RX controllers: Recover the previous state of the system write protect register in functions that are called within init-code
This commit is contained in:
parent
385611c5a9
commit
bd67fdf011
@ -99,9 +99,10 @@ 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 = (0xA5u<<8);
|
||||
SYSTEM.PRCR.WORD = (0xA5u<<8) | oldPRCR;
|
||||
|
||||
CMT0.CMCNT = 0;
|
||||
CMT0.CMCOR = (unsigned short)(((configPERIPHERAL_CLOCK_HZ/configTICK_RATE_HZ)-1)/128);
|
||||
|
@ -99,9 +99,10 @@ 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 = (0xA5u<<8);
|
||||
SYSTEM.PRCR.WORD = (0xA5u<<8) | oldPRCR;
|
||||
|
||||
CMT0.CMCNT = 0;
|
||||
CMT0.CMCOR = (unsigned short)(((configPERIPHERAL_CLOCK_HZ/configTICK_RATE_HZ)-1)/128);
|
||||
|
Loading…
x
Reference in New Issue
Block a user