-
Notifications
You must be signed in to change notification settings - Fork 969
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
Bipropellant protocol #72
base: main
Are you sure you want to change the base?
Conversation
Awesome that you are working on it! I still have to look a bit in more detail over the code. At a quick look, I have one remark. Instead of interrupt based UART can we use the DMA UART that I made, with circular buffer and Idle Line interrupt? You can check the framework in util.c |
It is a work in progress, not everything implemented and some parts do nothing which need to be removed. |
Yes, I did that already for the Serial Debug. If you look at this function in Of course, you can create you own custom |
very nice! Changed the implementation now to DMA USART. |
2 more remarks :)
|
Two easy points to change. Btw, you should also be able to commit to my branch if you like to contribute. |
@EmanuelFeru: Can you have a look at my usage of the sending routine? I guess I'm doing something wrong. Receiving is working well, but sending is very unstable.. I guess the problem is in USART3_DMA_send().. You are using: |
The check below has to be there to make sure the DMA counter (Counts down) has reached
Now, if you try to send data faster than it can be physically sent, then not all your data will be send, because the Are you sending ASCII data? I am not sure if it will make a difference, but I compute the length using |
Something is very fishy.. Indeed __HAL_DMA_GET_COUNTER is not ready yet. But when I wait for it to clear, way too much time goes by. |
Ok, I guess I know whats happening.. I need a buffer. Just sending garbage from reused memory locations |
Ok, with a buffer the garbage problem is solved. Still the delay is huge. |
Hmm, that is strange, because I do send data to my Sideboard every ~10 ms depending on the main loop duration (see below). If I have time I will quickly check with an oscilloscope if data is indeed sent at ~10ms intervals. |
Apparently, I created a conflict in |
- replaced `enable` with `m_motorsEnable` - fix renamig of `timeout` to `timeoutCnt`
Hi @p-h-a-i-l , First of all happy new year! |
Hi, is this pr working in the current state? Or is there still some things that need to be fixed? |
Work in progress.
already tested and working: USART3 PWM control over bipropellant protocol