Sorry, I meant PB1.
Fair enough. Which is the proper value for this revision? Did any boards ship with 5kΩ REV resistors? All the schematics I have seen back to 3.2 have 10kΩ for REV. As it stands, the code will detect all versions (with the correct resistors fitted) from 3.2 to 4.3 as v4.3. (I assume 4.3 also had 10kΩ; the schematic for this wasn't published). It doesn't look like this applies to 3.2, must be earlier. There's an analogue GPIO (pin 4) AIO0 on the RN52, but it's claimed to be bidirectional programmable I/O; I'd be surprised if it stopped RN52 from starting when high. Do you recall why this was hooked up to PB1 on the ATMEGA328P? I can't find any application notes or examples for using this pin on the RN52. PB1 is a PWM capable pin, so it looks like intention was a non-digital/binary signal. Still, if it is a problem, I guess saabstutz will have to fix hardware or float the patch. Cheers, Sam.
9³ 5D MY02 - Stålgrå, AS3; iOS 16.1; BlueSaab v5.0-p1+Amp v1.1, SAAB-CDC v4.1 with mods
|
Administrator
|
In reply to this post by saabstutz
Yay! Can you please take a (good as possible) picture of that part of the module and post it here? I'm biting my fingernails off at the moment thinking I've screwed up the soldering job... :) There's no specific command for getting hardware revision version. It just show's up in the "welcome" part of the code as it is being executed in the setup() part of the code.
2001 9-5 SE V6; 2006 9-5 Wagon; iOS; BlueSaab version = "latest and greatest" :)
|
Administrator
|
And yes... I just checked, BlueSaab module was shipped to saabstutz in mid August this year. Waaaay before hardware revision checks in the code, PWREN pull-ups and so on. I am sorry. My bad. Let's work on fixing this. I would still need to see that picture I asked in previous comment to double-check that HW part is ok.
2001 9-5 SE V6; 2006 9-5 Wagon; iOS; BlueSaab version = "latest and greatest" :)
|
Administrator
|
In reply to this post by sbt
2001 9-5 SE V6; 2006 9-5 Wagon; iOS; BlueSaab version = "latest and greatest" :)
|
Karlis,
This list matches the code. But in looking at the schematics for v3.2 through v4.2, the value specified for R13 is 10kΩ (and you also said originally that's what saabstutz's BlueSaab v4.1 should have). Were any built with 5kΩ? Aside from having the GPIO7 pin locked low to force 9600 to the RN52, is there any other issue with not being able to distinguish these versions? From what I can see, if they can't be told apart, then RN52 auto configuration can't be enabled for any of them, since v3.3A doesn't have the baud lock. That would be a shame for the current users as new RN52 features like track change and power saving are enabled; they would have to manually configure the RN52 to add these settings. Cheers, Sam.
9³ 5D MY02 - Stålgrå, AS3; iOS 16.1; BlueSaab v5.0-p1+Amp v1.1, SAAB-CDC v4.1 with mods
|
Administrator
|
HW revision check was something me and Seth came up with really late in this project. Software-wise post v3.3A. Though Seth, being the true visionary of hardware for this whole thing, had already provisioned for it beforehand. Then we came up with the resistor values for divider network to distinguish between different versions. I don't recall the exact reasoning behind the values we picked, but I *think* we went with a pair of 100KOhm/bottom->top "X" KOhm value pair, just to "streamline" things.
Apart from GPIO7 being pulled low (9600 baudrate by default) we are working on implementing more energy-efficient features. For instance, starting v4.3 SN CAN transceiver chip can be put to sleep and woken up per need basis (= saves power). Same with upcoming v5.1 - we could force a total shutdown of power for x amount of seconds to the module thus reseting it completely (if we ever need). All of this would also help us with implementing RN52's sleep/wakeup feature (= saves power), but we are quite a few steps away from it yet. :)
2001 9-5 SE V6; 2006 9-5 Wagon; iOS; BlueSaab version = "latest and greatest" :)
|
Administrator
|
Yes, pretty much what Karlis just said. The schematics don't match the hw REV resistor values because at the time they weren't being used. I should go back to all of them and edit the schematics to match the resistor=rev chart Karlis posted. When we did have the 328 tied to the AIC0 pin on rn52, we thought we might have needed it. Turns out we didn't need AIC0, so we remapped that pin to be the PWREN pin on every board since 3.3A (or something). But I do know for a fact that if the AIC0 pin is high when the rn52 is powered on, it will not boot. At one point I wasn't thinking correctly and thought that we needed a pwm pin to give the PWREN pin 3.3v instead of 5v (through a rc network). But I'm retarded because the 328 was already running on 3.3v so the output of any pin would be 3.3 already, not 5v. The AIC0 pin remap is a large part of the reason we started implementing the hw rev checks, as well as other hardware changes that the firmware cares about; like switching from 328P to 328P-AU (there are 2 extra analog I/O's on smt 328). On Thu, Dec 29, 2016 at 03:22 Karlis [via BlueSaab Forum] <[hidden email]> wrote:
NC, USA
|
OK, from this I take it that saabstutz's v4.1 module should have a 5kΩ resistor for R13/REV, should he decide to replace it, not 10kΩ as posted previously... ... and from this I conclude that PWREN cannot just be enabled for all boards. So it's either a hardware fix or ongoing software patch for saabstutz's module (and any others with the same resistors). Thanks for confirming. Cheers, Sam.
9³ 5D MY02 - Stålgrå, AS3; iOS 16.1; BlueSaab v5.0-p1+Amp v1.1, SAAB-CDC v4.1 with mods
|
This post was updated on .
Thanks you guys for the help. I'm amazed every day that a dead car brand can have such dedicated following, from the repairing/modding forums to here. You guys have been a huge help.
Also, cool to see you got the SID text to work. When I hopped into the car after installing it today, I got a huge smile on my face seeing that. Open software works! Instead of saying Legacy on that hardware check, could we say hardware version not detectable? I had seen that earlier, but assumed it was fine - I had no clear indication that that was out of whack, when it really needed to be v3.3A/v4.1/v4.2. I will send that picture later tonight when I get a chance. I'll probably end up fixing that resistor, but it's gonna have to wait a bit. Such is life. Now to figure out why XCode still doesn't like me...
--
SaabStutz '99 9-3 Base 4 Speakers :( BlueSaab Module - Karlis Built! Hardware V4.1 |
Great to hear your BlueSaab is back in action!
You mentioned that you'd fixed the release configuration. If something's still broken, can you confirm your version of Xcode, as well as what the symptoms are that you have now, and how to trigger them? Did you follow the embedXcode template install instructions (from the embedXcode user manual) to the letter? Cheers, Sam.
9³ 5D MY02 - Stålgrå, AS3; iOS 16.1; BlueSaab v5.0-p1+Amp v1.1, SAAB-CDC v4.1 with mods
|
In reply to this post by Karlis
Here's the pic.
--
SaabStutz '99 9-3 Base 4 Speakers :( BlueSaab Module - Karlis Built! Hardware V4.1 |
Free forum by Nabble | Edit this page |