This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Help needed for keil MCBSTM32 CAN application

Hello,
I'm using Keil MCBSTM32 evaluation board and µVision3.
I use the example CAN program downloaded from keil. My application will be to use an external rotational transducer (instead of the potentiometer on the board) to send converted analog value in CAN message.
Which code should i change/add so that i could use the transducer (at port A chan 0 for example) instead PA ch 1 of the pot? I've read the reference manual from ST but i didn't see any indication telling which registers correspond to which channel to use.
Thank you in advance.

Parents
  • all you need to do is slightly modify your ADC configuration. are you sure it does not appear in the reference manual?

    ADC->CR  |= 0x0033;                     /* cont. conversion all channels    */
    ADC->CCR |= 0x00FF;                     /* ADC, no WDG, Channel 0..4        */
    


    works for the STR9. does this help?

Reply
  • all you need to do is slightly modify your ADC configuration. are you sure it does not appear in the reference manual?

    ADC->CR  |= 0x0033;                     /* cont. conversion all channels    */
    ADC->CCR |= 0x00FF;                     /* ADC, no WDG, Channel 0..4        */
    


    works for the STR9. does this help?

Children