Page 1 of 1

Hard real time hardware in the loop Simulator

Posted: Thu Aug 26, 2021 6:28 pm
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 !.

Re: Hard real time hardware in the loop Simulator

Posted: Mon Aug 30, 2021 3:49 am
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

Re: Hard real time hardware in the loop Simulator

Posted: Mon Aug 30, 2021 4:59 pm
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 ?.

Re: Hard real time hardware in the loop Simulator

Posted: Tue Aug 31, 2021 4:30 am
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

Re: Hard real time hardware in the loop Simulator

Posted: Wed Sep 01, 2021 11:03 am
by sarath_suresh
Dear Jonas,

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

Best Regards,
Sarath Suresh