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

Add to can docs #3

Merged
merged 2 commits into from
Aug 25, 2021
Merged

Add to can docs #3

merged 2 commits into from
Aug 25, 2021

Conversation

anfroholic
Copy link

Hi IhorNehrutsa,

Thanks for your work adding to the can code base. I recently compiled your fork and it seems to be working great. I'd love to help out. I have a fair amount of experience with the can functionality of the stm32 version.

Let me know what your goals are and I will do what I can.

Thanks
Andrew

Add more commands and fix some errors in docs
@IhorNehrutsa IhorNehrutsa merged commit ff7af02 into IhorNehrutsa:pr/5310 Aug 25, 2021
@IhorNehrutsa
Copy link
Owner

@anfroholic Hi Andrew. Thank you very much.
I am very sorry that somehow I missed your PR at the time.
I would be very grateful for your help.
I merged your PR and rebase WIP: esp32 CAN(TWAI) driver #7381 and
now I'm not completely sure what all is Ok with the PR.

  1. Could you recheck the build and review code and docs? Please report to WIP: esp32 CAN(TWAI) driver #7381
  2. There is a compatibility/consistency issue between STM32 and ESP323 CAN API. Could you compare and confirm the differences between STM32 and ESP323 CAN API and help(rst) files? It will be great.
  3. I also try to develop CANopenNode drivers
    for STM32 WIP: Canopen #106.
    It is not tested yet. :(
    Is it interested for you?
  4. I want to add CANopenNode to MicroPython ports STM32 and ESP323. Your help is welcome.

Thanks, Ihor

@anfroholic anfroholic deleted the pr/5310 branch August 25, 2021 21:30
@anfroholic
Copy link
Author

Hi Andrew. Thank you very much.
I am very sorry that somehow I missed your PR at the time.
I would be very grateful for your help.

No problem, thanks for your work.

  1. Could you recheck the build and review code and docs? Please report to WIP: esp32 CAN(TWAI) driver ESP32: CAN(TWAI) driver micropython/micropython#7381

This branch? (pr/5310), sorry I am not very fluent with github.

  1. There is a compatibility/consistency issue between STM32 and ESP323 CAN API. Could you compare and confirm the differences between STM32 and ESP323 CAN API and help(rst) files? It will be great.

Sure. I think I can do that. I haven't seen this document before https://github.com/IhorNehrutsa/micropython/blob/pr/5310/docs/library/machine.CAN.rst and will mark it up to date.
The main differences to start are:

  1. ESP32 uses baudrate instead of ('sjw', 'bs1', and 'bs2') also there is no prescaler. I'm not sure how/if these can be reconciled. For simplicity's sake, it would be nice if the stm32 version would just adopt the 'baudrate' argument and than hand off applicable timing arguments to the controller under the hood.
  2. Filters: The ESP actually has only 1 filter so there is no filter banks to speak of. Also the way the banks are constructed are a little different as pyb.can takes int as arguments
  3. can.send: pyb.can will take a string, while this version takes a list of bytes

I also try to develop CANopenNode drivers
for STM32 WIP: Canopen micropython#106.
It is not tested yet. :(
Is it interested for you?
I want to add CANopenNode to MicroPython ports STM32 and ESP323. Your help is welcome.

I am working on something a little different, so that is not what I'm looking for. I'd be happy to offer my opinion on anything if you'd like to hear it.

Thanks again
Andrew

IhorNehrutsa pushed a commit that referenced this pull request Sep 8, 2021
asan considers that memcmp(p, q, N) is permitted to access N bytes at each
of p and q, even for values of p and q that have a difference earlier.
Accessing additional values is frequently done in practice, reading 4 or
more bytes from each input at a time for efficiency, so when completing
"non_exist<TAB>" in the repl, this causes a diagnostic:

    ==16938==ERROR: AddressSanitizer: global-buffer-overflow on
    address 0x555555cd8dc8 at pc 0x7ffff726457b bp 0x7fffffffda20 sp 0x7fff
    READ of size 9 at 0x555555cd8dc8 thread T0
        #0 0x7ffff726457a  (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xb857a)
        #1 0x555555b0e82a in mp_repl_autocomplete ../../py/repl.c:301
        #2 0x555555c89585 in readline_process_char ../../lib/mp-readline/re
        #3 0x555555c8ac6e in readline ../../lib/mp-readline/readline.c:513
        #4 0x555555b8dcbd in do_repl /home/jepler/src/micropython/ports/uni
        #5 0x555555b90859 in main_ /home/jepler/src/micropython/ports/unix/
        #6 0x555555b90a3a in main /home/jepler/src/micropython/ports/unix/m
        #7 0x7ffff619a09a in __libc_start_main ../csu/libc-start.c:308
        micropython#8 0x55555595fd69 in _start (/home/jepler/src/micropython/ports/uni

    0x555555cd8dc8 is located 0 bytes to the right of global variable
    'import_str' defined in '../../py/repl.c:285:23' (0x555555cd8dc0) of
    size 8
      'import_str' is ascii string 'import '

Signed-off-by: Jeff Epler <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants