Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The library is not working, please correct. #11

Closed
fermiums opened this issue Oct 17, 2021 · 2 comments
Closed

The library is not working, please correct. #11

fermiums opened this issue Oct 17, 2021 · 2 comments

Comments

@fermiums
Copy link

Bluepill STM32F103C8T6 generic_boot20_pc13

  1. Doesn't find the required library by the eXoCAN keyword, you have to download a zip archive from GitHub
  2. Used variables u_int32_t that do not work in the repository
    http://dan.drown.org/stm32duino/package_STM32duino_index.json
    they work in the slow and fat library at the link
    https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
    the same thing with the bpCanBlink.ino example, digitalToggle () does not work in it
    Solution: replace 12 variables with uint32_t, use digitalToggle -> static void instead
  3. Immediately upon the declaration of the can class, the processor goes into idle state. Problem in recursive begin declaration. file eXoCAN.h dates 150, 151 I commented out them.
  4. I don't know if it can be so correct, but 2 identical names are used in the same begin class with different functionality, which I also corrected for begin1
  5. Init passes only in the case of PORTB_8_9, but in both cases serial falls off due to the clock initialization lines, eXoCAN.cpp lines 82-92, yes, I understand that USB on PA 11 and 12 legs, but the controller completely freezes if they are assigned in the eXoCAN library ...
  6. After all these fixes, I managed to send one message using the can.transmit () command, after which the unused PC13 output (LED) turned on and the controller continued to work in loop () without sending it to transmit and Serial not working.

There is no debugging on this Arduino software, so I was very disappointed that I could not start CAN with the USB library. Now I have to use Cub for my task, but so far I have not come up with a beautiful solution with a bootloader.

@exothink
Copy link
Owner

I don't understand why you are having so many issues. Several others are using the library without issue. Using 'begin' with different signatures is standard C++.

The STM32F103C8T6 hardware does not support USB and CAN at the same time.

I use VS Code and the PlatformIO plugin and everything works fine.

@dartrax
Copy link

dartrax commented Feb 26, 2023

Bluepill STM32F103C8T6 generic_boot20_pc13

  1. Doesn't find the required library by the eXoCAN keyword, you have to download a zip archive from GitHub

Valid, same as #15

  1. Used variables u_int32_t that do not work in the repository
    http://dan.drown.org/stm32duino/package_STM32duino_index.json
    they work in the slow and fat library at the link
    https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
    the same thing with the bpCanBlink.ino example, digitalToggle () does not work in it
    Solution: replace 12 variables with uint32_t, use digitalToggle -> static void instead

Correct, thanks for the solution.

  1. Immediately upon the declaration of the can class, the processor goes into idle state. Problem in recursive begin declaration. file eXoCAN.h dates 150, 151 I commented out them.

Invalid, that's no problem, see below

  1. I don't know if it can be so correct, but 2 identical names are used in the same begin class with different functionality, which I also corrected for begin1

Invalid: As @exothink said correctly, using 'begin' with different signatures is standard C++.

  1. Init passes only in the case of PORTB_8_9, but in both cases serial falls off due to the clock initialization lines, eXoCAN.cpp lines 82-92, yes, I understand that USB on PA 11 and 12 legs, but the controller completely freezes if they are assigned in the eXoCAN library ...

Yes, it got stuck in Line 85/86 here, too. But then I found out that my bluepill is a clone without CAN functionality...

  1. After all these fixes, I managed to send one message using the can.transmit () command, after which the unused PC13 output (LED) turned on and the controller continued to work in loop () without sending it to transmit and Serial not working.

There is no debugging on this Arduino software, so I was very disappointed that I could not start CAN with the USB library. Now I have to use Cub for my task, but so far I have not come up with a beautiful solution with a bootloader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants