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

entering the world of arm, help with can exmaple.

I have tried the blinky example with success now on to can. The can example seems quite involved but I see why all the code is included. It's just missing some of the basic stuff that maybe I should know by now. I'm having a hard time putting it all together.

1) what pins are can? Looking at the data sheet I think PA12 and 13 are the dedicated can lines? I'm not use to that, normally you pick the GIO pins but ok with dedicated.

2) what clock is this thing set to? I'm using a COREXXXR board and no clock is available so I'm left to assume the code uses an internal clock. How does one set the internal clock on the stm32 boards?

3) Does anyone know of a general CAN schematic that would fit in with this example, a lot could be verified from that alone.

Parents
  • 1) Review the chip data sheet, describes pins and peripherals available on each one. Usually multiple choices to aid pin escape. Find CAN1_RX and CAN1_TX. Generally review the manuals for the parts you have chosen.

    2) www.waveshare.com/core205r.htm
    Clearly has a 25 MHz external crystal on rear of board, chip can use that HSE, with HSE_VALUE 25000000 define in code and PLL configure to divide it down. The Internal HSI is at 16 MHz could be used as an alternative, not recommended for CAN. Clock configuration code normally in system_stm32fxxx.c file. Reference Manual will cover clocking schemes and options.

    3) See Keil MCB and ST EVAL series board schematics, ST has dozens of boards supporting CAN interface. Olimex also.

    Consider if Keil forum is appropriate for chip/board specific discussion.

Reply
  • 1) Review the chip data sheet, describes pins and peripherals available on each one. Usually multiple choices to aid pin escape. Find CAN1_RX and CAN1_TX. Generally review the manuals for the parts you have chosen.

    2) www.waveshare.com/core205r.htm
    Clearly has a 25 MHz external crystal on rear of board, chip can use that HSE, with HSE_VALUE 25000000 define in code and PLL configure to divide it down. The Internal HSI is at 16 MHz could be used as an alternative, not recommended for CAN. Clock configuration code normally in system_stm32fxxx.c file. Reference Manual will cover clocking schemes and options.

    3) See Keil MCB and ST EVAL series board schematics, ST has dozens of boards supporting CAN interface. Olimex also.

    Consider if Keil forum is appropriate for chip/board specific discussion.

Children
No data