Tympan / Tympan_Library

Arduino/Teensy Library for Tympan Open Source Hearing Aid
MIT License
116 stars 31 forks source link

Feature board variant ccp #39

Open biomurph opened 3 years ago

biomurph commented 3 years ago

Made code changes to support the Tympan Rev D0:D1 board variants. Tested with the RenameBT_FunctionTest.ino and the CCP_SystemCheckout.ino firmware.

biomurph commented 2 years ago

These changes are motivated by the need to use Rev D prototype boards in the CCP Shield production run The prototype Rev D boards differ from the Production Rev D boards:

1- Production Rev D breaks out I2C bus 2 for the Shield 2- Prototype Rev D breaks out I2C bus 0 for the Shield

1- Production Rev D breaks out pin 41 for Shield MicBias which is used for littleLED 2- Prototype Rev D has 1.8V in the same position, so I wire pin 8 (TX_3) to control littleLED 3- Each board variant leave the unused pin unconnected, so I am driving them both to control littleLED in the code

1- Production Rev D breaks out pin 42 for the Shield AIC nRESET pin 2- Prototype Rev D breaks out pin 35 for the Shield AIC nRESET pin

I'm not sure where the default nRESET pin got named as pin 20, but pin 20 is not used in any Rev D board variants.

The only gotcha that I can see in deploying these changes is that the Prototype Rev D uses the same pin (35) for BOTH the main board AIC nRESET and the Shield AIC nRESET. In the case of using the Prototype Rev D, we need to make sure that we know that when we do the AIC reset process it trips reset on both AICs. In my examination of the code, I don't see that this is an issue, but I don't know the ins and outs of how the CCP Shield controls the reset function of each AIC.

I have further (small) changes to push up to this branch to bring it up to date with my local copy. I'm able to program both Rev D board variants (+ CCP Shields) with no run time errors. I will address any issues specific to the CCP Shield production on that repo.

NOTE: In my excitement about Paul moving major changes out of beta, I updated my Teensyduino to the latest version. This means that I have had to use the feature_Teensy4_SD_ble branch to do the flashing that @eyuan-creare requested in Issue 7 of the Dosimeter-PCB repo. In my local copy of that branch, I have also made these changes. Is it OK for me to push them to that repo? I was going to ask that question this morning anyway, might as well ask it here.

chipaudette commented 2 years ago

Great description! Thanks.

Was this branched off master or off develop (or off feature_Teensy4_SD_ble)?

[Also, it's now showing that this branch has conflicts that must be resolved and it won't let me merge. Can you resolve?]

biomurph commented 2 years ago

This was branched off of the feature_CCPShield branch

chipaudette commented 2 years ago

Before we can merge them, the conflicts need to be resolved. It won't let us complete the merge request without resolving. Can you do the resolve?

At minimum, they need to be resolved with Master, which should be straight-forward. The feature_CCPShield is old (it was merged into master quite a while ago and then abandoned) but I'm hoping that it doesn't have too many troublesome differences.

The wrinkle is that, if you're using the latest Teensyduino, these older versions of the Tympan_Library might not want to compile with the latest Teensyduino. For example, because of the SD business, I'm not even sure if Master compiles against the latest Teensyduino. You'll find out! If not, you'll have to resolve to the Develop branch. It compiles with the latest Teensyduino.

biomurph commented 2 years ago

OK I will merge the board variant branch and resolve conflicts as far as I can.

Joel


Making the world safe for robots
www.biomurph.com

On Tue, Jul 6, 2021 at 9:48 AM Chip Audette ***@***.***>
wrote:

> Before we can merge them, the conflicts need to be resolved. It won't let
> us complete the merge request without resolving. Can you do the resolve?
>
> At minimum, they need to be resolved with Master, which should be
> straight-forward. The feature_CCPShield is old (it was merged into master
> quite a while ago and then abandoned) but I'm hoping that it doesn't have
> too many troublesome differences.
>
> The wrinkle is that, if you're using the latest Teensyduino, you might
> need to resolve against Develop to get these older versions of the
> Tympan_Library to compile. The Develop branch is much further ahead and
> might be a more annoying resolution process.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/Tympan/Tympan_Library/pull/39#issuecomment-874776303>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABP6GGOZ3ISXRSOCQCWQAQDTWMCUHANCNFSM47B2PBFA>
> .
>