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.
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);
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.
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.
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
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
Hi Ajit,
Hi Ajit,
We can make an example for System Workbench at end of August.
BR,
Mikko
Thank You Sir.
Thank You Sir.
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
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
Great job Mikko, I'm really
Great job Mikko, I'm really eager to view your example for STM32 !
Yvan
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
Respected Sir,
Respected Sir,
Any update on the development please.?
BR
Ajit
Hello Sir,
Hello Sir,
Any update on releasing the DLMS client example on STM32 System Workbench?
BR
Ajit
Hi,
Hi,
One of our clients asked for some new features and we are releasing those serialization improvements first.
BR,
Mikko
Hello Sir,
Hello Sir,
Any update on releasing the DLMS client example on STM32 System Workbench?
BR
Ajit