Re: Canopen node nRF52832


Alexander Wachter
 

Hi Cristian,

Macros prefixed with CONFIG_ come from Kconfig.
Never try to set them in your application.
CONFIG_CAN_MAX_FILTER=13 goes to your mcp2515.conf
The CAN_MAX_FILTER is used in the MCP2515 driver,
and if you set it in some of your files, it won't end up in the driver.

As Marti already mentioned, you also need to allow MPU flash writes.

Cheers,

Alex

On 09.12.20 11:54, Cristian Anceschi wrote:
Hi all
I'm quite new on Zephyr and on CAN BUS so my question might have an easy or obvious answer.
I'm on Ubuntu and I'm using an nRF52DK nRF52832 (PCA10040) wired to a custom board equipped with a MCP2515 and a MCP2551 devices.
Is the samples\subsys\canbus\canopen suitable for an hardware like the one I'm using?
If so, any hints on how make this sample working?
1)
I can compile it  from command line with
west build -b nrf52dk_nrf52832 samples\subsys\canbus\canopen -DSHIELD=dfrobot_can_bus_v2_0 -DCONF_FILE=prj.mcp2515.conf
declaring in subsys\canbus\canopen\CO_driver.c (even though I thought it wasn't really need to declare this here)
#define CONFIG_CAN_MAX_FILTER 13
and prj.mcp2515.conf as attachment
Executing the project, I get the attached log file with a series of error messages and this stucks me here for this moment.
2)
Just to give some more info, I'd like to say that I did compile the samples/drivers/can from command line launching this
west build -b nrf52dk_nrf52832 samples/drivers/can/ -DSHIELD=dfrobot_can_bus_v2_0 -DCONF_FILE=prj.mcp2515.conf
and everything works as expected (tested using a CAN sniffer).
But it is not clear to me how to add in this project the CANOpen stack library.
Thanks in advance for the support
Kind regards
Crisian
--
Ing Cristian Anceschi
Galileo Engineering s.r.l.
Via Cavallotti 16
IT - 42122 Reggio Emilia
Phone +39 0522 920496 / +39 0522 516244
Fax     +39 0522 920496 / +39 0522 516244
Privacy - Le informazioni contenute nel presente messaggio di posta elettronica ed in ogni allegato sono da ritenersi informazioni riservate. Chi ricevesse il presente messaggio senza esserne l'effettivo destinatario è rigorosamente tenuto a evitarne ogni divulgazione, diffusione o riproduzione, ai sensi del D.Lgs n.196/2003. Qualora abbiate ricevuto la presente comunicazione per errore siete pregati di distruggerla e di segnalarlo al mittente. Grazie.
Privacy - The information contained in this e-mail message and any attached files are considered private information. If you have received this message without being the intended recipient, prevent any dissemination or reproduction. If you are not the addressee, please contact the sender and destroy all copies of the original message. Thanks.

Join devel@lists.zephyrproject.org to automatically receive all group messages.