Hmm, ok I'm adding 3 analog channels into an SAR ADC - the 1st one using P0 input worked fine.
Added another batter monitor using a pin P0 and got the analog routing error, so change to P0[2[ and all is well.
Now I'm adding a 3rd and nothing seems to make it happy - by trial and error. Even going by the PSoC 4 Pioneer kit guide and using P2,P2 and P2 for SARADC inputs fails. Certainly we can use more than 2 analog inputs?
I have P0 used for a digital UART (9600Baud) in but that can be moved.
Any guidance for analog routing methodology?
Minimal bundle attached.
Thanks! I'm having a lot of fun with this 😉
I just found a documenation bug 😞
In the PSoC4 BLE series, the dedicated port for the SAR ADC MUX has changed to P3 (instead of P2 as on the P4xxx series). The Architecture TRM gets this right, but the family data sheet still shows P2.
(I found it when looking at the analog routing diagram in the design wide resources - it shows how everything is connected).
The BLE Pioneer board actually map A0-A5 to port P3. You probably looked at the documenation for the non-BLE pioneer board?
You can have two SAR ADC inputs on other ports, using the internal ADC busses. But anything else / more needs to got to P3 (and its recommened anyway to reduce internal capacitance and input resistance)
Despite the documentation bug Hli pointed to, when assigning *real* pins, all port3 pins are shown as SARMUX indicating their primary use. When your PCB is not fabricated yet you'll be fine off!
hli, when you report the bug might suggest the ap note be revised as well
(the assigned pin table is incorrect per your findings) -
http://www.cypress.com/?rID=93401 AN86439 - PSoC® 4 - Using GPIO Pins
I think AN86439 is still correct since its not talking about the BLE series. But that limitation should be mentioned somewhere at least to avoid confusion.
Oh good - thanks y'all, port3 for ADC it is. Tested and verified. CySmart shows thermometer responds to heat and ice 😉
Someday I'll research using the I2C DS18B20 sensor but for now the TMP36 / ADC channel will do fine.
Thanks for the weekend support - you guys are great!
No, we just have too much time on our hands 😉
(OTOH Cypress only needed about an hour to respond to my support case either - they will change the docs)