cancel
Showing results for 
Search instead for 
Did you mean: 

MCP3564 interface with STM32F373

Apurba
Associate

I want to interface MCP3564 with STM32F373 for 4 channel differential ADC. Now i can read only one channel (channel A). I can't read another three channel. I have use the GitHub library (link ....  https://github.com/fhnw-ise-qcrypt/mcp3564/tree/main)

I am sharing the debug data...  

Before initialization .......

CONF0: c0
CONF1: 0c
CONF2: 8b
CONF3: 00
IRQ : 73
MUX : 01
SCAN : 00 00 00
TIMER: 00 00 00
RSVD: 90 00 00
RSVD2: 50
RSVD3: 00 0f

After initialization...........

CONF0: 0f
CONF1: 1c
CONF2: 8b
CONF3: f0
IRQ : 37
MUX : 01
SCAN : 20 0f 00
TIMER: 12 67 ce
RSVD: 90 0f 00
RSVD2: 50
RSVD3: 00 0f

I am reading 17 byte data from ADCDATA (0x0) register  .....

below given.......


0: 13
1: 80
2: 5a
3: 41
4: 03
5: 80
6: 5a
7: 41
8: 03
9: 80
10: 5a
11: 41
12: 03
13: 80
14: 5a
15: 41
16: 03

0: 17
1: 80
2: 5a
3: 41
4: 03
5: 80
6: 5a
7: 41
8: 03
9: 80
10: 5a
11: 41
12: 03
13: 80
14: 5a
15: 41
16: 03

0: 17
1: 80
2: 5a
3: 41
4: 03
5: 80
6: 5a
7: 41
8: 03
9: 80
10: 5a
11: 41
12: 03
13: 80
14: 5a
15: 41
16: 03

0: 17
1: 80
2: 5a
3: 41
4: 03
5: 80
6: 5a
7: 41
8: 03
9: 80
10: 5a
11: 41
12: 03
13: 80
14: 5a
15: 41
16: 03

 

I unable to understand what is missing.

Please help me. 

1 REPLY 1

@Apurba wrote:

I want to interface MCP3564 with STM32F373 for 4 channel differential ADC. Now i can read only one channel (channel A). I can't read another three channel. 


So what have you done to investigate the problem?

Compare what you do for channel A against the other channels.

Step through the code for channel A; step through the code for the other channels - what's different?

etc, etc, ...

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/tac-p/706966/highlight/true#M49