Hard real time hardware in the loop Simulator

Firmware/software/electronics
Post Reply
sarath_suresh
Beginner
Posts: 3
Joined: Thu Aug 26, 2021 6:21 pm

Hard real time hardware in the loop Simulator

Post by sarath_suresh »

Hello All.

I am developing a hard real time simulator for the crazyflie. It is running on an ST32L432KC microcontroller. I need to interface it to the crazyflie to send simulated imu,position measurements via SPI and receive the motor commands. Is writing a new deck driver the best way to achieve this ? Or is it necessary to define a new module ?

Thans in advance for your help !.
jonasdn
Expert
Posts: 132
Joined: Mon Mar 01, 2021 3:13 pm

Re: Hard real time hardware in the loop Simulator

Post by jonasdn »

Hi sarath_suresh!

That is really interesting! Please keep us in the loop!

I think writing a deck_driver is a good way to go! That keeps it modular and should make it easier to keep alive along side of the official code base.

Jonas
sarath_suresh
Beginner
Posts: 3
Joined: Thu Aug 26, 2021 6:21 pm

Re: Hard real time hardware in the loop Simulator

Post by sarath_suresh »

Hi Jonas,

Thank you for your reply. I will definitely keep you updated.

Do you have any reference code for connecting a deck via SPI ?.
jonasdn
Expert
Posts: 132
Joined: Mon Mar 01, 2021 3:13 pm

Re: Hard real time hardware in the loop Simulator

Post by jonasdn »

Hi!

You could have a look at the driver for the USD deck or the driver for the flowdeck:

- src/deck/drivers/src/usddeck.c
- src/deck/drivers/src/flowdeck_v1v2.c

And the way they are connected could be found at:

https://github.com/bitcraze/hardware/bl ... 2-reva.pdf

https://github.com/bitcraze/hardware/bl ... d_revb.pdf
sarath_suresh
Beginner
Posts: 3
Joined: Thu Aug 26, 2021 6:21 pm

Re: Hard real time hardware in the loop Simulator

Post by sarath_suresh »

Dear Jonas,

Thank you for sharing the references. I will take a look.

Best Regards,
Sarath Suresh
Post Reply