Using 2 Lighthouse decks with different configurations

Topics related to the Lighthouse positioning system, configuration and use
Post Reply
marvin
Beginner
Posts: 7
Joined: Wed Jan 26, 2022 10:02 am

Using 2 Lighthouse decks with different configurations

Post by marvin »

Hi,

I'm planing to use two Lighthouse decks with one Crazyflie (one for positioning and the other one for specific calculations on the FPGA). My question is, how can I flash those two with differnt bitstreams, since both of them have the same internal name (bcLighthouse4) and so will be handled by the same deck driver. Is there a way to assign each deck a seperate deck driver? The only way I can imagine is changing the internal name, but I couldn't finde any information about it.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Using 2 Lighthouse decks with different configurations

Post by arnaud »

Hi,

This is technically possible but you are trying to do something for which the deck was not designed at all.

The very fist step is indeed to change the identity of your other board, this can be done using one of the example python script: https://github.com/bitcraze/crazyflie-l ... py#L77-L84. The best would be to set vid:pid to 00:00 and then set another name. The Crazyflie will then match your deck with a deck driver of the same name.

Flashing using the bootloader is the really tricky part though: the FPGA bootloader listens to the UART and the I2C bus. The current implementation flashes the deck with I2C and communicates to it with the UART. The intention is that we should use I2C for everything in the future but it has not been implemented yet.

Both board will listen on the I2C bus on the same address, so there will be a conflict and what will likely happen is that both deck will be flashed at the same time. And cutting the I2C line on your compute deck would allow it to be flashed with the UART instead but you still cannot use the UART after that since is is going to be used by the lighthouse deck.

I can see 2 solutions, one hardware and one software:
- The hardware one is to cut both the I2C and UART line on your compute deck and to connect/patch the external UART (the pads bellow sensor 0 and 1) onto the other Crazyflie UART. This way you can both bootload and talk to your deck using this other UART.

- For the software one, you can re-synthesize the FPGA bootloader to listen to another I2C address. This way you will be able to bootload your deck independently and you will be able to talk to it using I2C. The bootloader can re-flash itself and it can even be tested as a firmware (to test if it work before flashing it at the beginning of the flash).

Do not hesitate to ask further about these two or other solutions, I could go in a bit more detail.
marvin
Beginner
Posts: 7
Joined: Wed Jan 26, 2022 10:02 am

Re: Using 2 Lighthouse decks with different configurations

Post by marvin »

Thanks, but currently I'm stuck on some other problems. I may return later to it.
Post Reply