M66, OpenCPU : UART not working

Hello All,

I am trying to interface STM32F1xx with M66.
I am using example_iic from OpenCPU setup

Baudrate : 9600

I have programmed STM32 mcu to keep sending a dummy data with some delay (Verified this in Analyzer)

Now coming to M66, when i observe the debug messages in Serial port utility, i see the following

M66 says Uart communicated and shows some random(not the one i sent) data and that’s it.

No further communication happens.
Questions

  1. What may be causing the data to be random as i see?
  2. How to get M66 ready for next reception?

Thank you !

Dear Sir,
Thanks for your inquiry in Quectel forum.
If you choose the external MCU, why you still choose M66 to work on OpenCPU mode ?
If M66 already work on OpenCPU module, which program you are running now ? If you want to communicate with module via UART, there have the example code in SDK package, you can check it. Thanks!

Hello Kyson,

My use-case is as follows.

  1. I want to use external MCU only for sensor interface (Because interrupt mechanism in M66 is not fast enough; it allows only 2 interrupts max per second)
  2. I want to send the sensor data to M66 through UART regularly.
  3. And M66 takes care of posting the sensor data onto cloud.

Question:
The SDK you mentioned is for STM32 ?
(Can you provide a link to that folder)

Dear Sir,
Thanks for your updating.

  1. I want to send the sensor data to M66 through UART regularly.
  2. And M66 takes care of posting the sensor data onto cloud.
    [K]Yes, i know. But you use which protocol to send the data to your cloud via M66 module, and you call which API to send the data to M66 via UART port ? And the SDK is for M66, not STM32. It is better to confirm the above questions carefully. Thanks!

I have Same problem

I am use Renesas Controller it send data through UART when my RF IC received Some data.

I am use UART PORT 3 Baud rate : 19200

  1. check uart_functions error result
  2. test baudrate
  3. dont block thread where is opened uart
  4. read data from urat_rx_callback
    5…

Hello WizlO,

Thank you for your replay.

1.Error not shown
2.baud rate is 19200
3.I am use single thread.
4.data read from uart callback handler.

I am use Open CPU. I am use Ql_UART_Read(); is it ok for read data from UART ?

In example shown different function for UART read sReadSerialPort()

  1. check BRG - transmit data to PC terminal
  2. dont block thread where is opened uart… dont do this:
    while(1) { … }
    while( waithing_flag ) { … }

if thread is not in rtos blocked state, the uart callback will never happen
in practice, the callbackS( uart, timer … etc ) is HIDDEN system message … processed from Ql_OS_GetMessage ( hidden for user )

example read: