Reply
Posts: 9
Registered: ‎05-05-2017

UART for Z3Light and Z3Switch

Hi,

I'm trying to test the Z3Light and Z3Switch for EFR32MG starter Kit. 

 

I want the coordinator and the end device to form and join a network using UART communication instead of Buttons.

 

I want to configure UART0 and add its initialization to void emberAfMainInitCallback(void) function. Then, when a send commands from an external Host, the coordinator can form a network for example.

In Simplicity ->HAL, we can't disable the field Application serial port, to disable the UART. 

I have noticed also that in the void emberAfMainInit(void) function, we have emberSerialInit(APP_SERIAL, BAUD_RATE, PARITY_NONE, 1); that uses the UART0, i don't want any debug print like emberAfCorePrintln("Reset info: 0x%x (%p)",).

Can you please help to achieve this ? Wich plugin to check, uncheck ?  Should i add some Custom Events ?

 

Thanks for your help,

 

Best regards,

Posts: 9
Registered: ‎05-05-2017

Re: UART for Z3Light and Z3Switch

Hi , My question wasn't clear ? please I need your help
Posts: 73
Registered: ‎04-26-2016

Re: UART for Z3Light and Z3Switch

Hello,

 

Can you use the CLI command to form/join the network? Per my understanding, you want to setup communication on the physics UART to connect another Host, am i right?  Please clear your question firstly.

 

Best Regards,

Lei

Posts: 9
Registered: ‎05-05-2017

Re: UART for Z3Light and Z3Switch

Thanks Lei, You are right, I want to setup communication on the physic UART with an external Host. I create my own UART functions to initialize, send and receive. Then, I added the init function to void emberAfMainInitCallback(void). When I Init the UART and want to send some data over TX pin using the function UARTDRV_Transmit(testHandle0, data, sizeof(data)); analyzing my pin using the logic analyzer, I see nothing in the pin. Best regards,
Posts: 73
Registered: ‎04-26-2016

Re: UART for Z3Light and Z3Switch

Hello,

 

How did you connect the Kit to your host? You can use the EXP UART PIN on the WSTK. We have a KBA, please review it first. And please note that you need choose the Virtual UART(port0) as Application serial port in "HAL configuration" in your project *.isc file, so that the UART0 will not be used by serial debugging.

 

 

http://community.silabs.com/t5/Mesh-Knowledge-Base/Forcing-EFR32-serial-communications-through-WSTK-...

 

Best Regards,

Lei

Posts: 9
Registered: ‎05-05-2017

Re: UART for Z3Light and Z3Switch

I didn’t connect the Kit to my host yet. I tried first to test the Tx pin of my UART (UART_TX / PA0 of the expansion header) using a logic analyzer. On the other hand, I didn’t choose the Virtual UART(port0) as application serial port in “HAL”. May be this is the problem. I’ll keep you informed when I make changes as you suggested. Best regards,
Posts: 9
Registered: ‎05-05-2017

Re: UART for Z3Light and Z3Switch

Hello, I did modification as You suggested (I choose Virtual UART port in the HAL). But in af-maon-soc.c, I always have emberSerialInit(..), and this function enables COM_USART0_ENABLE not COM_VCP_ENABLE. It’s normal? Best regards,