CYT4BFBCHAES MCAL ADC

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
mstewart
Level 1
Level 1
5 sign-ins First question asked Welcome!

Hi

MCAL: TRAVEO II AUTOSAR MCAL R4.2, version 1.7.0

Micro: CYT4BFBCHAES

 

Currently trying to configure an ADC channel but we are having some difficulty.

The ADC channel we wish to configure is located on Port Pin 10.7

Within the ADC configuration, the channel is setup as logical channel "0", 1 shot mode, normal sampling mode and triggered by SW, with no DMA 

The physical ADC channel is connected to ADC_SAR_0_1 peripheral, channel 3 and it has a pin ID of 87 

mstewart_5-1633018221839.png

 

mstewart_0-1633016674695.png

mstewart_1-1633016729834.png

The PORT module has also been configured for this physical pin 

mstewart_2-1633017266536.png

 

We have the clocks enabled for this ADC and we can see that the ADC is taking samples when requested, however we believe that the wrong physical pin is being sampled.

 

Looking at the "PASS0_SAR0_CH0_SAMPLE_CTL"  register and the "PIN_ADDR" bitfield 

mstewart_4-1633017929023.png

 

mstewart_3-1633017870307.png

For pin 10.7 we expect to see ( we believe ) a value of 3 in this register field, however what we actually see is a value of 23, which makes us think that we are actually sampling the wrong physical channel, but we do not know how to correct this.

 

Any idea on what could be causing this?

Thanks 🙂

Attached are the ADC, PORT, and MCU arxml files for reference

0 Likes
0 Replies