This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello!
I went through the Deep Dive Training Lab 1 - 5 (MSPWare --> Devices --> MSP432P4xx --> Training --> Deep Dive Training), and discovered some errors even in the solutions provided. Just want to share with the community, and hopefully can reduce frustration (which I went through) to figure out the bugs and to fix them.
1. Lab4_adc14
In the lab4_adc_solution.c, there's a 1 line code inside the adc14 ISR to clear the ADC14 IFG:
void adc14IsrHandler(void) { /* Clear ADC14 IFG */ ADC14CLRIFGR0 = CLRADC14IFG20; }
It was discovered that instead of CLRADC14IFG20, the correct one should be CLRADC14IFG0.
2. Lab5_software
This code does not work at first, after debugging I realised the problem is with the driverlib function ADC14_getResult. After inspecting the source file (adc14.c under the "driverlib" folder in "lab1_power" of the deep dive training), I discovered the error is with the ADC14_getResult function in line 579-580.
uint_fast16_t ADC14_getResult(uint32_t memorySelect) { return *((uint16_t*) (_ctlRegs[_getIndexForMemRegister(memorySelect)] + 0x80)); }
Instead of 0x80, it should be 0x20 as MSP432 is 32-bit. That solved the problem!
Hopefully this is useful for people who just started with MSP432P401R Launchpad. Have fun coding!
Best Wishes,
Hock Wei
Ngee Ann Polytechnic
Singapore
**Attention** This is a public forum