FreeRtos stopss logger Stream #1246
-
Board: Nucleo F439ZI Class "testMutex.cpp" : #include <modm/board.hpp>
#include <modm/processing.hpp>
class TestMutex
{
public:
TestMutex() = default;
void
hello()
{
modm::log::debug << "Welcome to Debug Stream example modm" << modm::endl;
}
private:
modm::rtos::Mutex mMutex;
int mValue;
}; main: #include "testMutex.cpp"
#include <modm/board.hpp>
#undef MODM_LOG_LEVEL
#define MODM_LOG_LEVEL modm::log::DEBUG
int
main()
{
Board::initialize();
TestMutex helloMutex;
helloMutex.hello();
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Probably best to start with this example of FreeRTOS integration in modm. Here you can find all FreeRTOS examples. |
Beta Was this translation helpful? Give feedback.
-
I Found the problem in the modm::platform::Usart3::write(uint8_t data) methode. As soon as the UsartHal3::isTransmitRegisterEmpty() is false, the buffer gets filled. But the Interrupt, which should empty the txBuffer will never be activated, as soon as I initilazie a Mutex anywhere.
|
Beta Was this translation helpful? Give feedback.
I Found the problem in the modm::platform::Usart3::write(uint8_t data) methode. As soon as the UsartHal3::isTransmitRegisterEmpty() is false, the buffer gets filled. But the Interrupt, which should empty the txBuffer will never be activated, as soon as I initilazie a Mutex anywhere.
My solution was to add a new Function emptyBuffer() to the Usart3, which does the same as the MODM_ISR(USART3) Interrupt. It enables the possibility to empty the Buffer without an ISR, and switch it into a Thread if needed. I don't really now how this ISR works and if i disablede/acknowledged all of them. Could you give me some feedback, if this is a possible solution or opens new problems? And where should I …