Go Down

Topic: Bootloader problem when SPI slave connected (Read 1 time) previous topic - next topic

estratos

Hi friends!

I've built a small board containing an ATMEGA328p and a CC1101 radio chip, both communicating via SPI. Everything works perfect except the Arduino bootloader. On four boards, the bootloader works well only in one of them, the one without the CC1101 IC mounted on it. On the rest of boards (with CC1101), the bootloader gives a lot of errors and rarely complete with "Upload done". However, even with errors, the image seems to upload correctly most of the times.

Anyway, I'm thinking that the serial bootloader is somehow driving the SPI lines and the CC1101 IC is responding to the avr, altering the upload process. In my next design, I'll be adding in-line 1k resistors to CSn, MOSI, MISO and SCK lines in order to isolate the radio chip whenever the SPI lines go into tri-state but I'm wondering if I could do anything else to solve this issue.

Thanks in advance for your ideas!

CrossRoads

Can you pull the 328 chip and program it in an UNO or equivalent?
Or otherwise ensure that there is no acivity on the RX/TX lines to interfere with the start up comms with the PC for loading?
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

estratos

Thanks for your reply!

Unfortunately my atmegas are surface mounted so I can not pull them from the board. On the uart side, I'm pretty sure that there is no traffic when I'm running the upload but I can not say the same on the SPI side,

MarkT

Suggest adding pull-up/pull-down resistors on the SPI bus to hold it safely idle, also that RF chip is 3.3V, what voltage are you running the 328 at when uploading?
[ I won't respond to messages, use the forum please ]

estratos


Suggest adding pull-up/pull-down resistors on the SPI bus to hold it safely idle


I wanted to avoid unnecessary pull-ups since this is a low power design but I could give it a try I guess.


also that RF chip is 3.3V, what voltage are you running the 328 at when uploading?


The atmega is running at 3.3V too. I'm also using a bootloader for 3.3V/8MHz systems that has proven to work well on different designs, even with SPI comms.

Thanks guys.

Go Up