6 years, 8 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:


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:

The Freedom-K64F is an ultra-low-cost development platform for Kinetis K64, K63, and K24 MCUs.
Be the first to answer this question.