FPC experiments: got so far TX_only, usart=115200 + usb=460800, see full commit msg

* Add \r\n to sent strings
* remove usart_init() from UsbPacketReceive cmd, it's already init in main.
* Add PLATFORM PM3RDV4FPC to ease dev
* TX: US_TCR is len of data to send, not len of buffer
* Use only one PDC bank as we're using it in sync
* Busy loop to wait for end of TX as we'using it in sync
* Change usart speed to 115200
* Don't downgrade USB speed, keep 460800
* Attempt to detect received data, fail so far
This commit is contained in:
Philippe Teuwen 2019-04-02 01:06:00 +02:00
commit 7bd95dd5c3
5 changed files with 29 additions and 37 deletions

View file

@ -194,14 +194,6 @@ serial_port uart_open(const char *pcPortName) {
// Flush all lingering data that may exist
tcflush(sp->fd, TCIOFLUSH);
#ifdef WITH_FPC
if (uart_set_speed(sp, 115200)) {
printf("[=] UART Setting serial baudrate 115200 [FPC enabled]\n");
} else {
uart_set_speed(sp, 9600);
printf("[=] UART Setting serial baudrate 9600 [FPC enabled]\n");
}
#else
// set speed, works for UBUNTU 14.04
bool success = uart_set_speed(sp, 460800);
if (success) {
@ -210,7 +202,6 @@ serial_port uart_open(const char *pcPortName) {
uart_set_speed(sp, 115200);
printf("[=] UART Setting serial baudrate 115200\n");
}
#endif
return sp;
}