xv4y 46 Posted February 9, 2013 Share Posted February 9, 2013 I had unpredictable hardware serial port issues when I when using too much RAM... Try to reduce the RAM (not Flash) usage and see if it works. Yan. Quote Link to post Share on other sites
Rei Vilo 695 Posted February 9, 2013 Share Posted February 9, 2013 ...or try using it on the StellarPad that features much more RAM! At USD13, the StellarPad is worth the extra USD9 compared to the USD4 LaunchPad MSP430! Quote Link to post Share on other sites
energia 484 Posted February 9, 2013 Share Posted February 9, 2013 So I was under the impression that you we running this on the StellarPad? Can you confirm on which platform you are running? StellarPad or LaunchPad? If you are running on the LaunchPad then you could very well be running out of RAM. The Serial lib takes up about 142 bytes. An empty Sketch takes about 32. So a Sketch using Serial is around 174 bytes of RAM. The 2553 has 512 bytes of RAM. That leaves you very little for the Matrix itself taking in account that you need enough RAM to accommodate a call stack. If you are indeed running on the MSP430 then you are probably running into the case where the stack grows more then RAM left and causes a stack overflow into working RAM. I compiled the MatrixMath_main example Sketch and examined it with msp430-size -A MatrixMath_main.cpp.elf. That gives the following output. Note the .bss section is close to 512 bytes. MatrixMath_main.cpp.elf : section size addr .text 8976 49152 .rodata 482 58128 .data 8 512 .bss 478 520 .noinit 2 998 .vectors 32 65504 .debug_aranges 1712 0 .debug_info 50231 0 .debug_abbrev 14137 0 .debug_line 17269 0 .debug_frame 5014 0 .debug_str 9925 0 .debug_loc 16438 0 .debug_ranges 884 0 Total 125588 Compile the same Sketch for a 2452 (that only has 256 bytes of RAM) and the linker will warn you that you overflowed. Edit: Changed 128 -> 256 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.