What anybody think about subj? Main cycle will be fixed time delay ( read sensors, filter it and apply PID), with max priority. Other threads like buzzer, OSD, Led,Sonar, Baro and UART with low priority. CPU time will most balanced.
I have adopted sources for PIC32MX795F512H ( 80MHz ~80MIPS). Now in a testing stage with PID ajusting.
Acc/GYRO: MPU5060
MAG: HMC5983
BARO: MS5611
Next devices exists on board but not used (still writting code to support it)
GPS: NV08C-CSM
Sonar: HC-SR04
Multiwii + FreeRTOS
Re: Multiwii + FreeRTOS
Does it compile with Arduino IDE?
Re: Multiwii + FreeRTOS
No. At this stage it's only an idea because i use PICmicro device, not Atmel.
Re: Multiwii + FreeRTOS
what are resources requirements for your rtos implementation?
Re: Multiwii + FreeRTOS
about 2kb RAM for RTOS (sheduler) + about 200 bytes RAM on every running thread ( stack ). If you mean FLASH resources, compilled project about 56kb. My project is so big size cause USB CDC Com Port emulation due to use MultiWii GUI.
Re: Multiwii + FreeRTOS
ok, thanks.
I guess you mostly adopted the main loop() code to suit the rtos capabilities?
From your experience so far, what do you consider to be the main readl world extra functionality and advantage you get from using an underlying rtOS?
I guess you mostly adopted the main loop() code to suit the rtos capabilities?
From your experience so far, what do you consider to be the main readl world extra functionality and advantage you get from using an underlying rtOS?
Re: Multiwii + FreeRTOS
Since i use MPU5060 with prescaler equal 15 (8000/15) = 500 Hz -> 2ms for one measurement for GYRO+ACC. In this case part of main loop() called every 2ms (+/- 100 us) that consist of filter for ACC and GYRO. To get one MAG measurement need to spend 6ms and next part of loop() code, that calc angle[ROLL], angle[PITCH], heading and applying PID params for motors throttle. Next thread with (prio-1) used to get rcData[] from transmitter and calc rcCommand, called every 20ms. Other low prio threads used for UART, LED, Buzzer, GPS, Sonar and Baro. To calc baro i need to spend 3 times of 8ms, so baro can be calculated every 24ms and it's not time sensitive. After all main thread remainig 2ms all time so time sensitive calculations will have less error.
Is anybody hear about Madwick MEMS filter?
Is anybody hear about Madwick MEMS filter?