Search found 30 matches
- Fri Sep 30, 2016 3:19 pm
- Forum: MicroPython pyboard
- Topic: connecting pyboard to CAN BUS
- Replies: 45
- Views: 40430
Re: connecting pyboard to CAN BUS
With CAN, all messages are received and acknowledged by all nodes on the bus. Then the filters decides if the message shall interrupt the software or the message shall be discarded. But if the bus it faulty or overloaded, you can get into a situation that messages from a node can not be sent to the ...
- Sat Sep 03, 2016 3:27 am
- Forum: MicroPython pyboard
- Topic: connecting pyboard to CAN BUS
- Replies: 45
- Views: 40430
Re: connecting pyboard to CAN BUS
Here is a skin that I know Works.
https://github.com/HenrikSolver/pybcanskin
https://github.com/HenrikSolver/pybcanskin
- Sat Sep 03, 2016 3:19 am
- Forum: MicroPython pyboard
- Topic: connecting pyboard to CAN BUS
- Replies: 45
- Views: 40430
Re: connecting pyboard to CAN BUS
How do you wire your P1 to the pyboard connectors. Have you measured whats on the pins of the transceivers?
- Mon Jul 11, 2016 4:16 pm
- Forum: General Discussion and Questions
- Topic: CAN Bus Communication
- Replies: 12
- Views: 13504
Re: CAN Bus Communication
Which messages do you want to receive? Are aware of how a filter of type MASK works? If you want to receive only 0x00FF3101 and 0x00FF3801 then you better use a LIST type filter instead.
In your example you are not setting the bank to 1. You are using 0 also in the lines that are commented out.
In your example you are not setting the bank to 1. You are using 0 also in the lines that are commented out.
- Sat Jun 11, 2016 5:26 am
- Forum: General Discussion and Questions
- Topic: Can I use the can.recv(0) in the rxcallback function?
- Replies: 11
- Views: 13711
Re: Can I use the can.recv(0) in the rxcallback function?
Yes it should be possible to use it in all interrupt functions. The intention is that all callbacks will have the option to be soft. Next in queue is extint. If you find any bugs or comes up with any possible improvments while using this, please report them here or even better in the PR at github.
- Fri Jun 10, 2016 2:30 pm
- Forum: General Discussion and Questions
- Topic: Can I use the can.recv(0) in the rxcallback function?
- Replies: 11
- Views: 13711
Re: Can I use the can.recv(0) in the rxcallback function?
Add the line
To boards/PYBV3/mpconfigboard.h
I only have V10 boards, so thats the only one I have tried it on.
Code: Select all
#define MICROPY_PY_SOFTIRQ (1)
I only have V10 boards, so thats the only one I have tried it on.
- Thu Jun 09, 2016 8:32 pm
- Forum: General Discussion and Questions
- Topic: Can I use the can.recv(0) in the rxcallback function?
- Replies: 11
- Views: 13711
Re: Can I use the can.recv(0) in the rxcallback function?
folke is right, the soft irq feature does only exist in my repository https://github.com/HenrikSolver/micropy ... e/softirq2 so far.
- Fri May 27, 2016 11:19 am
- Forum: General Discussion and Questions
- Topic: Can I use the can.recv(0) in the rxcallback function?
- Replies: 11
- Views: 13711
Re: Can I use the can.recv(0) in the rxcallback function?
The reason is that you are allocating memory in the callback. tmp = bus.recv(self.fifo) The callback is executing in interrupt mode, and in that mode memory it is not allowed to allocate memory. There has been some discussions about how to solve this. One way is to add soft interrupts like in this P...
- Sat May 21, 2016 6:24 am
- Forum: General Discussion and Questions
- Topic: OSError 16 about can bus communicate
- Replies: 1
- Views: 3460
- Fri May 20, 2016 10:15 pm
- Forum: General Discussion and Questions
- Topic: CAN Bus Communication
- Replies: 12
- Views: 13504
Re: CAN Bus Communication
Hi. The parameters to the set filter call can not work. you should get an error on that line. The filter definition must be a list or an tuple that is four elements long when using CAN.LIST16 filters. In your code you try to use a single integer. Then I would like to suggest to use a catch all filte...