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.
8 years, 3 months ago.
K64F uart4 stopped by ethernet
I have a program that uses two serial ports and ethernet for comms. I just updated to the latest version of EthernetInterface (rev 56), and find uart4 no longer works (uart3 is still fine). My code (below) works fine but when I remove the comments round eth.init() pin PTC17 just stays high. Does the latest ethernet library use these pins? How can I safely get back to a working version of uart4? - Thanks
- include "mbed.h"
- include "EthernetInterface.h"
- include "BufferedSerial.h"
BufferedSerial VectorNav(PTE24,PTE25); UART3 BufferedSerial ServoControl(PTC17,PTC16); UART4
Serial PC(USBTX, USBRX); EthernetInterface eth;
void init() { VectorNav.baud(19200); ServoControl.baud(19200); PC.baud(115200);
/* if (eth.init("10.1.10.240","255,255,255,0","10.1.10.1")== 0) Use fixed IP address PC.printf("eth.init OK..."); else PC.printf("eth.init failed..."); */ }
int main()
{ init(); while (true) { VectorNav.putc(85); "A" ServoControl.putc(85); } }