- Changed vApplicationSetupTimerInterrupt (TA0CTL to TABCTL, and all those from A->B)
- Changed prvSetupHardware (Configured to 1Mhz , instead of 8 in the original)
- Inside Leds.c configured proper ports for two leds being used.
Porting from MSP430FR5996 to MSP430FR2355 issue
Hi all,
I have tried to port MSP430FR5969 example to MSP430FR2355 and for some reason it always fails at pvPortMalloc and finishes in vApplicationMallocFailedHook.
FR23 has more RAM then FR59 so there is no reason to fail at this.
Things I did:
Porting from MSP430FR5996 to MSP430FR2355 issue
Did you try increasing configTOTALHEAPSIZE?
Which heap implementation are you using?
https://www.freertos.org/a00111.html
Porting from MSP430FR5996 to MSP430FR2355 issue
heap_4 is used.
For the size tried ( 14 * 1024 ) and (20*1024), no change.
Thing is that this code (in original form) is for uC with much lower RAM values , so this should work without any issue in that sense.
Porting from MSP430FR5996 to MSP430FR2355 issue
Is it the first allocation that fails? If so it could be that the c startup code is not initializing the variables properly.
Porting from MSP430FR5996 to MSP430FR2355 issue
Yes it seems that first init is failing.
/* If this is the first call to malloc then the heap will require
initialisation to setup the list of free blocks. */
if( pxEnd == NULL )
{
prvHeapInit(); <-- enters here
}
What action could verify this condition and/or what could be done?
Porting from MSP430FR5996 to MSP430FR2355 issue
Ok it seems that setting did the trick.
The difference was that in original example static was missing.
Also had to lower TOTALHEAPSIZE.
~~~
define configAPPLICATIONALLOCATEDHEAP 0
// Original #define configTOTALHEAPSIZE ( 14 * 1024 )define configTOTALHEAPSIZE ( 3 * 1024 )
~~~ Now issue becomes that all stops in ISR trap after ~15 seconds , and I can reproduce it , it is always ~15 seconds. ~~~ ;—————————————————————————– ;– default ISR handler if user does not supply ;– simply puts device into lpm0 ;—————————————————————————–.sect ".text:_isr:__TI_ISR_TRAP"
.align 2
.global __TI_ISR_TRAP
__TIISRTRAP:
BIS.W #(0x0010),SR
JMP __TIISRTRAP
NOP ; CPU40 Compatibility NOP
~~~
Could this be somehow connected?
Porting from MSP430FR5996 to MSP430FR2355 issue
Are you using the correct linker script for the part?
Porting from MSP430FR5996 to MSP430FR2355 issue
Yes I am, lnk_msp430fr2355.cmd.