SCANF implementation

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
5 posts / 0 new
Last post
posciamelo
Offline
Last seen: 1 year 8 months ago
Joined: 2020-06-08 07:18
SCANF implementation

Hi,

is there any example on how to implement a function (and a handler) to manage messages received from the serial interface (e.g. via teraterm).

If not, is there at least an app callback in the "user_app_callbacks" list which I can leverage to write my own handler upon receiving a message from the serial port?

Thanks 

Device: 
posciamelo
Offline
Last seen: 1 year 8 months ago
Joined: 2020-06-08 07:18
No answer?

No answer?

TR_Dialog
Offline
Last seen: 5 months 2 weeks ago
Staff
Joined: 2014-06-30 23:52
Hi posciamelo,

Hi posciamelo,

Please take a look at the sample project; \SDK_6.0.14.1114\DA145xx_SDK\6.0.14.1114\projects\target_apps\peripheral_examples\uart

It has examples of uart_receive. Let us know if that helps.

thanks,

TR_DIALOG

 

posciamelo
Offline
Last seen: 1 year 8 months ago
Joined: 2020-06-08 07:18
Thank you for the tip.

Thank you for the tip.

How should I configure my peripherals in order to test the UART using the 1-wire configuration on Pin 0_5?

thanks

PM_Dialog
Offline
Last seen: 6 months 3 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi posciamelo,

Hi posciamelo,

Adding to TR_Dialog, please also check CFG_UART_ONE_WIRE_SUPPORT macro in the suggested example. This macro s used to enable the 1-wire UART mechanism. The uart_one_wire_enable() and uart_one_wire_tx_en() should be used. Both APIs call the GPIO_ConfigurePin() for the pin configuration, so you will just need to call them:

uart_one_wire_enable(UART1, GPIO_PORT_0, GPIO_PIN_5);

 uart_one_wire_tx_en (UART1);

Are you using a custom board, or any of our DKs?

Thanks, PM_Dialog