MAX32630FTHR Operator new[] out of memory with WiFi (esp8266)

Hi there,

somehow, 512KB of SRAM is not enough for MAX32630FTHR to run the simple WiFi example. Getting the following error when trying to connect to my WiFi module:

> WiFi example
> 
> Scan:
> 
> 
> ++ MbedOS Error Info ++
> Error Status: 0x8001011F Code: 287 Module: 1
> Error Message: Operator new[] out of memory
> 
> Location: 0xD55D
> Error Value: 0xFFFFFFFF
> Current Thread: main Id: 0x200028BC Entry: 0xFF91 StackSize: 0x1000 StackMem: 0x20001368 SP: 0x20002274 
> For more info, visit: https://mbed.com/s/error?error=0x8001011F&tgt="MAX32630"
> -- MbedOS Error Info --
> WiFi example
> 
> Scan:
> 
> 
> ++ MbedOS Error Info ++
> Error Status: 0x8001011F Code: 287 Module: 1
> Error Message: Operator new[] out of memory
> 
> Location: 0xD55D
> Error Value: 0xFFFFFFFF
> Current Thread: main Id: 0x200028BC Entry: 0xFF91 StackSize: 0x1000 StackMem: 0x20001368 SP: 0x20002274 
> For more info, visit: https://mbed.com/s/error?error=0x8001011F&tgt="MAX32630"
> -- MbedOS Error Info --
type or paste code here

No idea why. This example works perfectly with other boards with much less FLASH and SRAM memory. Anyone could help me with this?

I also have to add to this, that MAX32630FTHR does not work with any OS version newer than 6.9.0 due to Mutex 0 error. I might make a new Topic for it in near future. Right now, this is the most puzzling problem I’m facing.

I’ve gone through all kind of troubleshooting methods that I know of or I could think of. Tried this example on Mbed OS 5 but it was fruitless.

Hello,

double check your wiring. I saw that error after Scan call in the past and it was caused by bad wiring.

BR, Jan

Hi there Johnny!
I’ve had checked it and just checked it again. Everything should be connected correctly. Still getting the same error.

This board works on 1,8V logic by default. In examples, what were made specially for this MAX target are lines like these:

#include "max32630fthr.h"
MAX32630FTHR pegasus(MAX32630FTHR::VIO_3V3);

That will switch to 3V3 logic. Do you have it like that?

BR, Jan

Hi Johnny,

Yes I have done that using the library from here max32630fthr - Board library for MAX32630FTHR platform | Mbed
side topic I have made a working example of this library on my Github :stuck_out_tongue:
Anyways… it was again fruitless. I suspect there is something wrong with UART bus on MAX board itself, based on topics of MAX32620FTHR.

BR,
Danial

You can verified UART (probably only one is possible to use UART2 - P3_1, P3_0) when you connect it to another board or to an USB to TTL convertor.

BR, Jan

Hi,
That is true! I will try to see if normal UART communication works alright with another board.
I suspect there could be something wrong with config JSON files or similar kind of problems. The board has already so much problem with newer Mbed OS versions that it requires a dedicated person/team to have a in depth troubleshooting etc. (Something that perhaps Maxim Integrated should have done?)

Sadly I’m relatively new to Mbed platform, thus I don’t have the necessary knowledge on how does Mbed works, target configs etc.
Therefore cannot go too in depth at the moment. Gotta research Mbed files, how they relate and how they work.

I will do my best and test UART with another board and report back the results. But it will take me some time.

Regards,
Danial Mousavi

I haven’t tried for a while but:

//RawSerial  dev(P5_3, P5_4);   //maxim Tx, Rx
//RawSerial  dev(P3_1, P3_0);   //maxim Tx, Rx

Used to work with SerialPassthrough on my MAX32630FTHR

I’m sure it worked with OS-5

However there’s a baud rate issue with the maxim’s or library, couldn’t get it work above 115200 but it should go much higher according to specs which leads me to believe there’s a problem with the clock pre-scaling code, I did mention it here.

https://os.mbed.com/questions/84655/Serial-port-Tx-problem/

Wow, was that really three years ago! I’ll dig mine out and try it again, I did like the maxim platforms but gave up because it was not supported by Maxim at the time.