Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to use Linx with STM32F4 #129

Open
L1ikhith opened this issue Apr 25, 2024 · 4 comments
Open

Trying to use Linx with STM32F4 #129

L1ikhith opened this issue Apr 25, 2024 · 4 comments

Comments

@L1ikhith
Copy link

L1ikhith commented Apr 25, 2024

Hello
I am trying to develop custom firmware with linx to talk with STM32F446ZE board(BTT octopus V1.1). the board is working using custom firmware built using platformIO, now i am trying to integrate linx to the firmware so i can control the board using labview, i was able to integrate linx with my firmware without any errors but when i tried to run a Manual Blink example from labview i was getting Error 5003.

here is the link to the project
https://github.com/L1ikhith/Linx-STM32f

I am not sure where i went wrong can anyone help me with the issue

@samkristoff @spathiwa the issue was in labview the VISA module is writing data [255,7,0,1,0,0,7] to the serial without any error but when VISA module reads the serial instead of getting [255, 7] i am getting some random data [82,101]

@L1ikhith
Copy link
Author

L1ikhith commented May 1, 2024

Hello @samkristoff @spathiwa i had some success with the communication but I am stuck at Load Device config vi,
Error: in the Load Device config all the modules are working until the LSB reaches 10, once it reaches 10 instead of sending all the response packet at once the data is splitting into multiple packets(see example)

for example
when the LSB is at 10 if the data size is 0 the response packet is 255, 6, 0,10,0,0 instead of 255,6,0,10,0,15 and in the second iteration its sending 0 and 15
i am not sure why its causing this issue i sent couple of days to understand the issue but no luck, can you please let me know what's causing this issue

@samkristoff
Copy link
Contributor

Can you post a screenshot of the error.
Did you modify any of the LINX VIs?

@samkristoff
Copy link
Contributor

A couple thoughts. The UART buffer size on the device is defined here . This determines the max packet size since it has to fit in the buffer. Yours looks fine.

Decimal 10 is LineFeed (LF) in ASCII. I think the VISA driver uses LF as a delimiter by default but the LINX VI should disable that under the hood.

@L1ikhith
Copy link
Author

L1ikhith commented May 3, 2024

Thanks for the reply @samkristoff i didn't modified any Linx vi's. "Decimal 10 is LineFeed (LF) in ASCII." this makes sense whenever the LSB or MSB bit reaches 10 its chopping the data into two
for ex if the data packet is[ 255,6,0,10,0,15] at 10 instead of sending the whole packet i am seeing [255,6,10,0,0] and [0,15,0,0,0]
this issue is only happening on STM 32 board when i tried with Arduino Uno the data was not corrupted at bit 10

One more issue that i am facing was with set device baud rate Vi, the issue was during the execution of this vi it will first disconnect the existing serial communication and reinitializes with the new baud rate right, when its reinitialize the communication instead of using the same COM port a new alias resources was created with Port binding and initializing the communication with the new alias; this is only happening on STM 32 board there was no issue with UNO

My guess was the port was not getting closed properly is there any way to make sure the port closes properly?

Note: the device was connected to COM 9
new alias were created every time when the serial was initialized
Screenshot (3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants