-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
oa-tc6-lib/libtc6/src/tc6-regs.c
Lines 542 to 549 in 8cc5240
| cfgParam = initValue3 & 0x000Fu; | |
| tempParam = (int16_t)9 + initOffset1; /* To be MISRA compliant */ | |
| cfgParam |= (uint16_t)tempParam << 10; | |
| tempParam = (int16_t)14 + initOffset1; /* To be MISRA compliant */ | |
| cfgParam |= (uint16_t)tempParam << 4; | |
| while (pReg->initialized && !TC6_WriteRegister(pReg->pTC6, 0x00040084, cfgParam, CONTROL_PROTECTION, NULL, NULL)) { |
The code above preserves the bottom 4 bits of address 0x4:0x0084, but AN1769 sets these bits to 0x3 (0b0011):
uint16 cfgparam1 = (uint16) (((9 + offset1) & 0x3F) << 10) | (uint16) (((14 + offset1) & 0x3F) << 4) | 0x03Which one is correct?
Metadata
Metadata
Assignees
Labels
No labels