2024-09-13 08:38 AM - last edited on 2024-09-16 03:07 AM by GaetanGodart
Hello everyone,
I'm working with a STM32F429 Discovery team right now. The unit receives/receives a stream of data by interrupting the UART_5, in which the ';' character selects one data field from another within the stream. , all data fields are 6 bytes long and ASCII encoded. The problem is that the display has more texAreas, Screen1 contains five textAreaa, while screen2 contains four textAreas. TouchGFX editing is as easy as possible ,Box as background ,wildcards ,textArea nothing else. The problem is that the text is "blurry" when refreshed and appears here on the display, and unfortunately not according to the correct texArea position. I was thinking that Model:tick() and HAL_UART_Receice_IT() "interfere" with each other's tasks.
If there is a possibility to attach files here on the forum, I would attach main.c, screen1View.cpp and screen2View.cpp files.
I was thinking that I should stop the interrupt for the time of the display ---and this is the question of how do I do this --- and get it back on if I have the display refresh. How can this be explained by my question and of course based on the screenView files, why does the text to be updated appear here there? Thank you very much in advance for your help! Good luck to everyone and good weekend! , Thank you in advance for Help ,for everybody !
I 'm updating my post my message
Hi Everybody ,
Please excuse me for my bad english language knowledge ....
I working with STM32F429 Discorey and in since i posted my proble with this few days ago , and Thank You Very much for help for everybody !.
I watch in Youtube an video about semaphore . This is the YouTube Video Internet link : https://www.youtube.com/watch?v=bCppZf8FKYg . The author of video : Mr Karl Yamashita ,This is a very usefull video , and i learn much for this ! Thank You very much !
But when i compiled my project it is important to be mentioned ,I am use STMCube IDE System and the compiler gived the follow console error message :
C:/TouchGFXProjects/RX_GPS_GFX_Tracker/TouchGFX/gui/src/model/Model.cpp:39:35: error: invalid conversion from 'osSemaphoreId_t' {aka 'void*'} to 'QueueHandle_t' {aka 'QueueDefinition*'} [-fpermissive]
It's like xSemaphoreTake() method "need QueueHandle_t" type object / varianle. But ! The relevant part of project with problem it is the rows below :
Model.cpp file :
#include "cmsis_os.h"
#include "PollingRoutine.h
extern osSemaphoreId binarySemUartMsgHandle;
Model::Model() : modelListener(0)
{
}
void Model::tick()
{
if(binarySemUartMsgHandle != NULL)
{
if(xSemaphoreTake(binarySemUartMsgHandle , (TickType_t)10) == pdTRUE)
{
uartMsgRdy();
uartMsgRdy_1();
slice_gps_stat = Read_HC12_Radio_Stream(uartMsgBuf);
}
}
}
void Model:: uartMsgRdy()
{
modelListener -> uartMsgRdy();
}
void Model::uartMsgRdy_1()
{
modelListener -> uartMsgRdy_1();
}
My questios it is : what is the proble with xSemaphoreTake() API method arguments ? Why not accept
osSemaphoreId binarySemUartMsgHandle object ,when it 's really exist ? What appear the erron in complier widolw like this ?
C:/TouchGFXProjects/RX_GPS_GFX_Tracker/TouchGFX/gui/src/model/Model.cpp:39:35: error: invalid conversion from 'osSemaphoreId_t' {aka 'void*'} to 'QueueHandle_t' {aka 'QueueDefinition*'} [-fpermissive]
Thank You for EveryBody to help and good week end !
Solved! Go to Solution.
2024-09-16 03:22 AM
Hello @joseph_lengyel_1972 and welcome to the community!
You can share files with your messages by clicking on "Drag and drop here or browse files to attach" bellow your message :
Also, I invite you to use the button </> to share code :
(I did it for you this time).
Preventing interrupts could work. It would help us if you could provide screenshots/pictures of the issue.
Regarding your error message, it seem you are using the wrong type.
I assume the error occur on line "if(xSemaphoreTake(binarySemUartMsgHandle , (TickType_t)10) == pdTRUE)".
"binarySemUartMsgHandle" is not the expected type. Double check what the function is expecting for its first parameter.
according to the error message, the first parameter must be of type 'QueueHandle_t' {aka 'QueueDefinition*'}.
I hope this helps you.
If this message or another one solved your problem, I invite you to select it as "best answer".
Regards,
Other message from the author regarding the same subject :
https://community.st.com/t5/moderation-archive/stm32discovery-notes-for-textarea-update-problem/m-p/719976#M39405
2024-09-13 08:51 AM
You can disable UART interrupts temporarily while updating the display or use a flag-based system to handle updates more efficiently.
2024-09-13 08:59 AM
Hello @joseph_lengyel_1972 and welcome to the community,
Unfortunately, the issue is not clear.
@joseph_lengyel_1972 wrote:
The problem is that the text is "blurry" when refreshed and appears here on the display
Better to share image of what you are seeing to show that "blurry" behavior.
@joseph_lengyel_1972 wrote:
If there is a possibility to attach files here on the forum, I would attach main.c, screen1View.cpp and screen2View.cpp files.
Yes, you can do it by dragging the files and drop in the discussion box:
Need also to refer to that video on how TouchGFX interacts with hardware.
2024-09-16 03:22 AM
Hello @joseph_lengyel_1972 and welcome to the community!
You can share files with your messages by clicking on "Drag and drop here or browse files to attach" bellow your message :
Also, I invite you to use the button </> to share code :
(I did it for you this time).
Preventing interrupts could work. It would help us if you could provide screenshots/pictures of the issue.
Regarding your error message, it seem you are using the wrong type.
I assume the error occur on line "if(xSemaphoreTake(binarySemUartMsgHandle , (TickType_t)10) == pdTRUE)".
"binarySemUartMsgHandle" is not the expected type. Double check what the function is expecting for its first parameter.
according to the error message, the first parameter must be of type 'QueueHandle_t' {aka 'QueueDefinition*'}.
I hope this helps you.
If this message or another one solved your problem, I invite you to select it as "best answer".
Regards,
Other message from the author regarding the same subject :
https://community.st.com/t5/moderation-archive/stm32discovery-notes-for-textarea-update-problem/m-p/719976#M39405
2024-09-30 07:32 AM
Hello @joseph_lengyel_1972 ,
Were you able to move forward on your issue?
Regards,
2024-09-30 09:03 AM
Hello , Thank You very much for Help !
From this help , I'm learning a new thinks and than you very much. The problem has been resolved ,the textArea text display.
I'm use UART Interrupt HAL_UART_Receive_IT() by STmicroelectronics Tutorial and its working ,Thank You !
-The real problem was a 0x13 , 0x0 A characters in data stream (Carriage Return , New Line ) ----- beaucause from data source Arduino the end of data stream has been sent with Serial.println() ) .. When the data stream arrived without terimation of 0x13 0x0A (from data source Arduino at the end of data stream only with Serial.print) character in TochGFX in every textArea all ****text appear fine !*** ****The stream without 0x13 0x0A ,all texts appear good ! *** For synchronization my frame look like this : 's' , ' T', 'X', ';' , data_field_1 ,';' , data_:fieldd_2 , ' ;' , .... ,data_field_8 ; whew the ' ; ' it is delimiter between data fileds.
data_field_9 , ';' , 'E' ,'T','X' . .The data stream array type is char like this : char my_data_array[80] at STM32Discovery side / receiver . ; So the start of frame it is "STX" and the end "ETX" with printable characters ( "STX and "ETX" it's filtered fine when displaying data) . Now i have problem with data synchronization
Again Thank You very much for time ,an for help !
Kind Regards : Joseph . L