So my module had been working solidly for +1 month. Then one fine day after a 30 minute drive, the ‘source’ abruptly switched over to radio and CD1 disappeared. A quick unplug & replug brought CD1 back, only to disappear again. I left the module unhooked overnight, and thereafter it seemed to operate for 10-30 minutes at a stretch before giving up the ghost. Note that the BT connection was always discoverable, and I could forget & pair the device.
Upon closer inspection, the CAN controller <-> resonator connection was a bit anemic, and a quick touch-up with the iron set things right (knock on wood). One thing I noticed: one of the CAN LEDs lights up only faintly, and the other one doesn’t light up at all AFAICT. I can’t remember if this behavior has changed since I first built it. Is this normal/expected? |
Administrator
|
The reason CAN LED lights up faintly is because it signals when the particular Rx buffer of MCP2515 is filled and is ready to be handed over to us for handling accordingly. It happens really fast and is normal.
I'm currently doing a serious overhaul of the CAN code to eliminate some bugs that are still there and on occasions cause Atmega-328 to reset thus screwing up CAN comms for a second or so which is enough for BlueSaab to drop out...
2001 9-5 SE V6; 2006 9-5 Wagon; iOS; BlueSaab version = "latest and greatest" :)
|
Just curious: what do you use to sniff the CAN bus traffic?
Last month, I saw an interesting demo of a project that uses CAN bus. IIRC, he's using the same CAN bus library you are. |
Administrator
|
I'm using the same BlueSaab module but with a bit of a code, that just makes it sit on the bus and listen to the comms around. Then it prints the interesting bits out on serial output.
Also, as of late, I've started using a logic analyzer by Saleae. It captures all the comms on a really low level which then can be analyzed applying filters and what not. Seth also has used an oscilloscope for some testing.
2001 9-5 SE V6; 2006 9-5 Wagon; iOS; BlueSaab version = "latest and greatest" :)
|
In reply to this post by Pilkerton
Arghhh, I have the same and I can't get it to work again. Bluetooth is working properly, but the connection to the radio doesn't. Soldering looks ok,.. Is there something else it can be?
:(
9-5 Estate MY2004/Aero/Glacier Blue/AS2
|
Well that's a bit of a bummer…are you really really really sure the connections are all OK? Have you inspected them with a lens? Because it was working, it's likely a marginal solder connection somewhere. In my case, both signal pins of the resonator had continuity to the CAN controller, but one was 0.1 ohms and the other was something like 0.2 ohms. I'd say it's worth passing the iron over the relevant connections: the CAN bus controller, the xtal resonator, the CAN bus interface, and maybe even the main connector. Pads of the through-hole components (such as the resonator) may look OK, but it's probably worth lingering on them with the iron for a little extra heat. The good news is that there's not a whole lot to go wrong. The power supply is obviously OK, since the RN-52 is working.
|
Not used a lens yet, Karlis made this module so I'm not expecting it to be the connections on the board. :)
9-5 Estate MY2004/Aero/Glacier Blue/AS2
|
looked a little closer and only one light was constantly red, so I disconnected again and left it disconnected for 10 minutes, reconnected it and it booted like it should.
/me is happy again :)
9-5 Estate MY2004/Aero/Glacier Blue/AS2
|
Administrator
|
Which LED was on? Power? If so, then RN52 had either crashed or went to sleep (which should never happen unless there's an explicit setting set to do so), but then again, you said Bluetooth connectivity was working fine. Something doesn't add up here.
2001 9-5 SE V6; 2006 9-5 Wagon; iOS; BlueSaab version = "latest and greatest" :)
|
This post was updated on .
In reply to this post by Pilkerton
tldr; a 3.3v Atmega might be marginal at 16Mhz
So just when I thought things were stable again, this morning my BlueSaab device was nowhere to be found. Thinking about hsl’s similar experiences, plus other mysterious reboot behavior Karlis mentioned, I wondered if the tolerance of the resonators could possibly be at issue, which led me to this informative stack exchange thread. Please double-check this, but it looks like the Atmega is being operated out of spec. Here’s a screen from the “Speed Grades” page of the Atmega datasheet: While the general consensus seems to be "3.3v @ 16Mhz works for me, YMMV", this quora post offers the following advice:
|
Administrator
|
I know 16mhz is out of spec for 3.3v...but lots of people use them at this speed, and I've never had problems before. HAVING SAID THAT...I'm going to try some 8Mhz resonators and we'll see if things get better...always room for improvement :)
NC, USA
|
Free forum by Nabble | Edit this page |