Purpose of CrazyRadioPA's 74HC1GT50

Firmware/software/electronics
Post Reply
jynik
Beginner
Posts: 2
Joined: Tue Jun 28, 2016 2:15 am

Purpose of CrazyRadioPA's 74HC1GT50

Post by jynik »

I've been working with some nRF24LU1+ firmware on the CrazyRadio PA and would like to add SPI Master mode support.

There's no issue with the MOSI, MISO, SCK pins. However, I'm a bit concerned about contention on the CSN (P0.3) pin.

Table 98 in the nRF24LU1+ product spec notes that for P0ALT[1:0] = "01", P0.3 is "Configured as output, typically used for Master SPI, see chapter 9 on page 99." That's not at all comforting -- I would hope the pin direction is still controlled by P0DIR!

If setting up master mode via P0ALT[1:0] = "01" sets up P0.3 as an output, then I'd have contention between the nRF24 and the 74HC1GT50 output.

Thus, I'm considering removing the non-inverting buffer and directly connecting the CSN pin on P2 to the nRF24LU1+. I'd like to know:
  • Why was a non-inverting buffer used on the CSN pin, but not on other SPI pins?
  • Why does the output of this buffer go to both P0.3 and P0.5?
  • Any warnings/concerns you'd advise WRT to removing it (in terms of using/re-flashing the CrazyRadio PA)?
  • Has anyone looked SPI Master mode and the effect on the P0.3 directionality (if there actually is any)?
Thanks,
Jon
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Purpose of CrazyRadioPA's 74HC1GT50

Post by arnaud »

Hi,

- The non-inverting bugger is aimed at being used for PPM input. The use case was to connect Crazyradio directly to a RC transmitter PPM output. These output can have a level of up to 12V to the buffer is doing voltage conversion.
- For PPM input it is connected both to the interrupt input and to the timer input
- If you plan to work with the Crazyradio firmware make sure you are still able to flash it via SPI (should not be a problem if you want to keep CSN on the connector).
- I have never looked at SPI master and not heard of anyone else with Crazyradio using SPI master.

I am curious to know what is your use-case for SPI master on Crazyradio

/Arnaud
jynik
Beginner
Posts: 2
Joined: Tue Jun 28, 2016 2:15 am

Re: Purpose of CrazyRadioPA's 74HC1GT50

Post by jynik »

Hi Arnaud,

Thanks for the quick reply and for detailing the design elements that I wasn't familiar with; this makes a lot more sense now!

Beyond its use with the CrazyFlie, I've found the CrazyRadio PA to be a really nice and accessible piece of hardware to experiment with nRF24LU1+ for various projects.

In this case, the SPI master functionality is not intended for use with the CrazyFlie, but as a means for me to reflash other CrazyRadio PAs in the wake of "oopsies" and other SPI flash devices in general.

So... tl;dr -- I'm venturing off into some custom firmware and use-cases.

Cheers,
Jon
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Purpose of CrazyRadioPA's 74HC1GT50

Post by arnaud »

Hi,

I guessed that you wanted to use Crazyradio with something else than Crazyflie (It is intended: the reason it is called Crazyradio and not "Crazyflie radio dongle" is because we see use for more than the Crazyflie ;). I had the same idea as your of using a crazyradio to flash a crazyradio but the chip select situation is a bit problematic.

If you are interested I have recently made some experiment on easy to make Crazyradio programmer. The first one is a "fix" script for Raspberry-pi that will make the Crazyradio start in bootloader mode. The second is an arduino program to make a programmer out of a 3.3v Arduino (the 3.3v voltage is important there). the mechanic works really great with the Adafruit feather M0: https://goo.gl/9Fv8pN. If you are interested on testing this kind of arduino programmer I can rush and publish some code for it.

/Arnaud
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: Purpose of CrazyRadioPA's 74HC1GT50

Post by whoenig »

Hi Arnaud,

I would be interested in any solution for (re)flashing the Crazyradio. I think I "broke" a few by flashing a faulty firmware (i.e. I can't get into bootloader mode anymore).

Thank you!

Wolfgang
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Purpose of CrazyRadioPA's 74HC1GT50

Post by arnaud »

Hi Wolfgang,

A little while ago I pushed a "de-bricking" script that uses a Rasperry pie on the Crazyradio repos: https://github.com/bitcraze/crazyradio- ... bootloader.

Otherwise I will try to clean-up my code and push an Arduino flasher during the week.

/Arnaud
Post Reply