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.
I have been working with the MSP430f5438a timer blocks and have ran into some strange behavior. I am pretty certain I have found the root cause. It seems that the ISR vector for timer A0 CCR1-6 and Timer A1 CCR0 have been swapped. The workaround I have found is modifying the msp430f5438a.h file as follows:
OLD:
#define TIMER1_A0_VECTOR (49 * 1u) /* 0xFFE2 Timer1_A3 CC0 */
/*#define TIMER1_A0_ISR(func) ISR_VECTOR(func, ".int49") */ /* 0xFFE2 Timer1_A3 CC0 */ /* CCE V2 Style */
.......
#define TIMER0_A1_VECTOR (53 * 1u) /* 0xFFEA Timer0_A5 CC1-4, TA */
/*#define TIMER0_A1_ISR(func) ISR_VECTOR(func, ".int53") */ /* 0xFFEA Timer0_A5 CC1-4, TA */ /* CCE V2 Style */
FIX:
#define TIMER1_A0_VECTOR (53 * 1u) /* 0xFFE2 Timer1_A3 CC0 */
/*#define TIMER1_A0_ISR(func) ISR_VECTOR(func, ".int49") */ /* 0xFFE2 Timer1_A3 CC0 */ /* CCE V2 Style */
.......
#define TIMER0_A1_VECTOR (49 * 1u) /* 0xFFEA Timer0_A5 CC1-4, TA */
/*#define TIMER0_A1_ISR(func) ISR_VECTOR(func, ".int53") */ /* 0xFFEA Timer0_A5 CC1-4, TA */ /* CCE V2 Style */
Timers now work as expected. I did not see any mention of this in the device errata. If I am missing something please let me know the correct fix.
Thanks,
Steven
OCY is right, you misinterpreted the naming.
The naming convention is:
TIMERx_yz_VECTOR.
Where y is the timer type, x is the number of the timer of this Type and z is the vector index.
So TIMER1_A0_VECTOR and TIMER1_A1_VECTOR both belong to TIMER A1.
It shoudl rather be TIMER_A1_VECTOR0 and TIEMR_A1_VECTOR1, but appending th evector index to the 'VECTOR' appendix looked a bit ugly for the one who generated this.
Originally, there was only one TIMER A at most, so the names have been TIMER_A0/TIMER_A1 for the two vectors. Btu when an index became necessary, it has been added after 'TIMER', making things more confusing than before.
**Attention** This is a public forum