Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 10 months ago.
Conflict Between Accelerometer Library and Ethernet/RTOS on FRDM-K64F?
I'm trying to write a different implementation of logging accelerometer data than my logging to an SD card (frdm_fxos8700_logger) by sending packets containing accelerometer data back to a host computer. I was having some problems trying a quick-and-dirty hack of the logger to send packet data where the program would stall sometime during ethernet initialization, so I started fresh from the UDPEchoClient.
After some testing, I determined that the initialization of the FXOS8700CQ library I wrote is what is causing the stall. In addition, Jim Carver's FXOS8700Q library initialization causes the Ethernet's init() to stall. Both libraries complete I2C transactions during their constructors to set the accelerometer configuration registers for use.
Any ideas as to what is happening? Code included below:
mbed_network_udp_echo_server.py
import socket ECHO_PORT = 7001 # changed from example code sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.bind(('', ECHO_PORT)) while True: data, address = sock.recvfrom(256) print "datagram from", address sock.sendto(data, address)
Import programudp_testing_echo_data
Playing with the UDPEchoClient to prototype delivery of data over UDP.
Comment out main.cpp:9 to have the echo 20x "Hello World" over 20 different UDP 'trades' of packets happen. Note: this program uses 115200 baud for the mbed serial data rate.
Question relating to:
