UART READ WRITE



  • I am running the following code portion on a Fipy and LoPy with firmware version 1.18.1.r7.

    uart1 = UART(1, baudrate=9600)
    uart1.init(9600,bits=8,parity=None, stop=1)
    rcv=False
    while True:
            while not rcv:
                time.sleep(5)
                if uart1.any() > 0:
                  recv=uart1.readall() 
                  print('Received from PIC %s' %recv)
                  rcv=True
    

    The serial communication is between a PIC 18F4620 processor and Pycom via a level logic convertor ( TXS0108EPWR from Texas Instruments). The code is working as expected on the LoPy but the same code on FiPy has buffer issue. I keep getting the same old data from the buffer for FiPy. Tried uart.deinit() as well but no success. Why is the UART buffer acting differently between LoPy and Fipy?



  • Hi @robert-hh ,
    Both Lopy and Fipy have firmware release='1.18.2.r1'



  • @dda Do both device have the same firmware version?



Pycom on Twitter