cancel
Showing results for 
Search instead for 
Did you mean: 

How to Convert From ISP to CAN

Kenno
Associate II

Hi

I got this problem where I got an MCP2515 that wants an ISP type signal, and then converts it to CAN. I am only familier with the CAN protocol and the HAL library, so is there an easy way to make the STM32 convert the code from CAN to ISP?

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

+ Have a look at the following threads:

https://community.st.com/t5/stm32-mcus-products/mcp2515-with-stm32f429/m-p/109379

https://community.st.com/t5/stm32-mcus-products/mcp2515-module-library/td-p/220994

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4

ISP ? You mean SPI

You'll have to read the MCP2515 manual and write a driver that dispatches data you want sent via CAN, over the SPI bus in whatever Command/Data formatting the MCP2515 uses.

Perhaps there are other examples of using MCP2515 on an MCU you can use as a starting point?

Define Easy.. The HAL SPI implementation has several general examples of that symmetrical bus. Is there a cut-n-paste example you can simple copy? Hard to say, would suggest looking via Google and GitHub

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

@Kenno wrote:

I got an MCP2515 that wants an ISP (sic) type signal


So this:

AndrewNeil_0-1714407291935.png

As it says on the tin, it's a "Stand-Alone CAN Controller with SPI Interface" - not "ISP".

SPI is a very long-established and widely-used bused - you can find plenty of resources describing it; eg,

https://en.wikipedia.org/wiki/Serial_Peripheral_Interface

https://learn.sparkfun.com/tutorials/serial-peripheral-interface-spi/all

Yes, STM32s - including the HAL - support SPI

 


@Kenno wrote:

is there an easy way to make the STM32 convert the code from CAN to ISP?


I think you've missed the point of the MCP2515 !

AndrewNeil_1-1714407751913.png

 

It's the MCP2515 which does the "conversion" between CAN and SPI !

You'll need to start by studying the MCP2515 documentation:

https://www.microchip.com/en-us/product/mcp2515 

 

SofLit
ST Employee

Hello,

STM32F3 has CAN instance. So all you need is an external CAN transceiver like MCP2551 not a CAN controller. So could you please explain why you would plan to use MCP2515 chip (CAN/SPI controller)? 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
SofLit
ST Employee

+ Have a look at the following threads:

https://community.st.com/t5/stm32-mcus-products/mcp2515-with-stm32f429/m-p/109379

https://community.st.com/t5/stm32-mcus-products/mcp2515-module-library/td-p/220994

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.