Part Number: TMS320F28377D
Hello,
I am currently implementing a CAN bootloader, the data receiving and writing phases work fine, the checksum of the data at the end replies everything is fine so the system jumps in the new application. When I load the symbol of this application, everything seems fine, I can do step to step, the init functions are called correctly, all data seems to be initialize fine. But when I looking at the interrupts of PWM and ADC, nothing is moving, I never go in the interrupt functions. I tried to compare the code write from Flash to Ram during init phase, everything seems fine.
Then I tried to restart the application with CCS, and everything was working perfectly... I had the correct PWM and ADC IT.
I noticed even if I didn't had the IT for the PWM and ADC, the IT for timer and CAN was working fine (NB : I had some trouble at the beginning with the CAN mailboxes initialized at the declaration, the data was in Cinit and wasn't initialize after the jump so I set the mailboxes in const and initialize them in a init function) and they were already initialized in the bootloader code, so I tried to initialize the PWM and ADC in the bootloader init. After in the application everything was working (but I'm not really a big fan of this solution !)
I have seen another person which seemed to had the same problem on this post on Jun 9, 2011 2:35 PM:
but I didn't say if he manage to resolve it.
The problem seems to be during the init phase after the jump but I can't see what I'm doing wrong. Before the jump I turn off interrupts with INTM bit, disable the PIE in the PIECTRL reg:
DINT
IER = 0x0000;
IFR = 0x0000;
asm(" ZAPA");
asm(" MOV @SP,#0");
asm(" PUSH AL");;
asm(" POP DBGIER");
asm(" LB 0x88004");
At the address of the jump of 0x88004 I defined a BEGINAPP : origin = 0x088004, length = 0x000004 in the cmd file of the bootloader
I have the same address in the application for my BEGINAPP within the .sect "appstart" of the application cmd
When I do the jump the system goes at the beginning of the main so it seems fine.
But I guessing there is another init phase before the main that I'm missing, and this init phase is done when I restart the C2000 which is why the application should work after the restart.
Do you maybe know how to fix this problem, or maybe explain how to do this init phase so the interrupts can be initialize ?
Thank you,
Clement