-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Add camera triggering in omnibus #13161
Comments
Can you paste the actual error? And can you give some more background on what you're trying to achieve and what exactly you have tried, and what docs you have looked at, etc.? |
The camera trigger parameters doesn't appears by default as the camera trigger driver is disabled to save flash since omnibus has 1MB memory. So what i have done is uncommented the camera_trigger in driver section in default.cmake in board/omnibus folder. After some digging into code and tracing the error I went into ~/Desktop/Firmware/boards/omnibus/f4sd/src/board_config.h
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// and further down
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Also in ~/Desktop/Firmware/boards/omnibus/f4sd/src/timer_config.c /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// All these entries are just pattern matching from other four entries. I dont know anything at micro controller level so strongly suspect these things will make things wrong. |
@Razbotics - without digging in on this what I can tell you is the PWM rate is set per TIMER. The Timer has channels and all timers channels run at the same rate. The above channel allocation looks incorrect. There are 2 timers. TIM2 and TIM3 with 2 channels each.
This is incorrect:
|
@davids5 Well i get that my timer configuration for pin 5 and 6 on omnibus is incorrect. The 4 PWM motor pins are correctly defined and i don't have to make any changes to them. I want the pin5 or pin6 to have triggering capabilities for camera, So for that i seek help for correcting pin configuration on omnibus board target. I did update the timer index by setting PA1 to index 2 and PA8 to index 3. Since index 0 and 1 is taken by TIM2 and TIM3 for 4 gpii pins. But still it doesn't make any difference. Are there TIM5 and TIM1 really available on omnibus as mentioned in a commented out region?
|
@Razbotics you will need a copy of the schematic to verify the wiering as to what pins are used. Then you will need to add the timer definitions (see px4\fmu-v5 for an example) There will need to be 4 timers. Then the index of the channels need to point to timer index 2 and index 3. The Timers need to have the first and last index of the channels. First = last = 4 and First = last = 5 for the timers respectively. Then in board_config.h you will need to change DIRECT_PWM_OUTPUT_CHANNELS and DIRECT_INPUT_TIMER_CHANNELS to 6 |
@davids5 thanks for the info, and sorry for the late reply. I got what you want to say is that i have to dig into schematics for pinouts. But what is the line "First = last = 4 and First = last = 5 for the timers respectively" means. Can you please elaborate on that? It would be helpful. |
I have configured and activated all 6 PWM pins on Omnibus according to there TIMERS and CHANNELS mentioned in schematics. But still the camera trigger is not working properly. No matter what trigger params I change the camera triggers at 25Hz at all 6 pwm pins. Even if I disable the trigger in params, the camera continues to get triggered at 25HZ, Strange. |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
I am working on how to correctly enable and define pins for camera triggering for omnibus F4 SD.
Default it is not enabled and if enabled from cmake pin not defined error occurs. Please guide me the exact pin definition of 5 and 6 for omnibus F4 SD.
The text was updated successfully, but these errors were encountered: