Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. ANSI C For STM32F429 Microcontroller

ANSI C for STM32F429 Microcontroller

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By technoshell , 13 July, 2021
Forums
Gurux.DLMS

Respected Sir,

I have a STM32F429 Custom Board with UART 1 configured for DLMS optical port reading.
I use the AC6 System Workbench with AC6 STM32 MCU GCC Compiler with STM32 HAL.
I tried to adapt the ATMEGA DLMS Client Example to read HDLC DLMS Meter. I am able to read the meter with DLMS Director and so also with Arduino board.

In the initialization main.c there is no equivalent for usart_sync_get_io_descriptor(&USART_0, &con.io); in the AC6 MCU GCC Compiler.
Similarly in the communication.c file there is no equivalent for io_write(connection->io, data->data, data->size);

Can you please guide on how to use HAL_UART_Transmit and HAL_UART_Receive in the readDLMSPacket() function for transmitting and receiving the frames. So also in comReadSerialPort() function.

Thank you for your time.

Regards
ASP

Profile picture for user Kurumi

Kurumi

4 years 11 months ago

Hi,

Hi,

You need to change the serial port communication part. I don't have System Workbench available at the moment, so I can't do it now.
But it's something like this:

Replace:
io_write(connection->io, data->data, data->size);
With
HAL_UART_Transmit(&connection->io,(uint8_t *) data->data, data->size, 5000);

and

io_read(connection->io, connection->data.data, 1);
with
HAL_UART_Receive(&connection->io,(uint8_t *) connection->data, 1, 2000);

BR,
Mikko

technoshell

4 years 11 months ago

In reply to Hi, by Kurumi

Thank You Sir,

Thank You Sir,
I will try this way for Transmit and Receive.
What do you suggest should be the equivalent for
connection con;
usart_sync_get_io_descriptor(&USART_0, &con.io);

In System workbench we initialize Serial Port as
UART_HandleTypeDef huart1;
HAL_UART_Init(&huart1)

Please advise the correct way of doing the initialization of serial port.
For the time being I tried
HAL_UART_Receive(&huart1,(uint8_t *) connection->data, 1, 2000); as advised by you.
It generates "Src/communication.c:37:6: error: cannot convert to a pointer type"
Please advise how to get over this error.

Best Regards
Ajit

Profile picture for user Kurumi

Kurumi

4 years 11 months ago

Hi Ajit,

Hi Ajit,

We can make an example for System Workbench at end of August.

BR,
Mikko

technoshell

4 years 11 months ago

In reply to Hi Ajit, by Kurumi

Thank You Sir.

Thank You Sir.

technoshell

4 years 9 months ago

Hello Sir,

Hello Sir,
You had indicated that an example of System Workbench will be available August end. Can you update any developments please.

BR
Ajit

Profile picture for user Kurumi

Kurumi

4 years 9 months ago

Sello Sir,

Sello Sir,

Example for System Workbench is ready. One of our clients asked for one change and it must be implemented before this can be released. I hope that the example for System Workbench will release in this week.

BR,
Mikko

ybou04

4 years 9 months ago

Great job Mikko, I'm really

Great job Mikko, I'm really eager to view your example for STM32 !
Yvan

edygunawan

4 years 9 months ago

Hello Mikko,

Hello Mikko,
I am wondering if the Gurux for STM32 implementation has been available for our reference, please advise, thank you.

Edy Gunawan

technoshell

4 years 9 months ago

In reply to Sello Sir, by Kurumi

Respected Sir,

Respected Sir,

Any update on the development please.?

BR
Ajit

technoshell

4 years 8 months ago

Hello Sir,

Hello Sir,
Any update on releasing the DLMS client example on STM32 System Workbench?

BR
Ajit

Profile picture for user Kurumi

Kurumi

4 years 8 months ago

Hi,

Hi,

One of our clients asked for some new features and we are releasing those serialization improvements first.

BR,
Mikko

technoshell

4 years 6 months ago

Hello Sir,

Hello Sir,
Any update on releasing the DLMS client example on STM32 System Workbench?

BR
Ajit

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin