5 years, 8 months ago.

fopen doesn't work with UbloxUSBModem library on C027?

Hi, I'm using the C027 board with a sdcard connected on P1_20-21-23-24. When I'm trying to use the fopen function my program stops. I did the following tests : - If I remove the fopen function, my program works good but without access to the sdcard. - If I keep the FATFileSystem and remove the UbloxUSBModem library, my program work good and it can access to the sdcard.

Any idea ?

Thanks in advance

Question relating to:

The u-blox-C027 is a complete starter kit that allows quick prototyping of a variety of applications for the Internet of Things. The application board has a MAX-M8Q GPS/GNSS receiver and ...

1 Answer

5 years, 8 months ago.

The memory is very limited on the LPC1768 and the mbed_official modem driver are very demanding (RAM/FLASH/CPU). Maybe you are running out of memory? You can also try to use the updated C027_Support library which also contains a simple driver that exposes the modem api. There is a sample application called C027_SupportTest to give you a start.

Import libraryC027_Support

support library for C027 helper functions for Buffer Pipes, Buffered Serial Port (rtos capable) and GPS parsing. It includes modem APIs for USSD, SMS and Sockets.

Import programC027_SupportTest

C027_Support library test

Thank you for your answer Michael. The idea of my application is to read every hour 6 data on a RS232 device (connected on UART3), to send them to a website (thingspeak) and at the same time the data are saved on a SDcard. The bin file is about 50ko. I've base my program on the C027_HTTPClientTest because I need doing a POST on a http address. First I had problems with the compatibility between serial port and RTOS and I solve that using the advices of Tyler Weaver ( http://mbed.org/users/tylerjw/notebook/buffered-serial-with-rtos/) and that works very good. Afterward I've added the HTTPClient.lib and UbloxUSBModem.lib from the C027_HTTPClientTest (I use the same fatfilesystem lib. and the mbed_rtos lib. used in the UbloxUSBModem library). With the C027_HTTPClient libraries, I can compile the program but when I reset the C027, it freezes shortly after. and as I said before, when I removed them, everything works. I tried to modify the FATFileSystem lib. based on a post made by Tyler Weaver here http://mbed.org/forum/mbed/topic/3980/ but I did it without understanting what I was doing and that doesn't work. What can I do ?

posted by Martin Bochud 11 Apr 2014