Closed Elektroman2 closed 8 years ago
I'll definitely review this soon... but it looks like it breaks the build due to MCUs that don't have the CAN peripheral. I can fix this during the review if you're not confident to do it.
I used eclipse to build the lib, but I didn't copied the config files, just the include folder, (as I think now, also forget to copy the src folder, but the interrupt handler needs it). It also needs modifications for other microcontroller families, but currently I can only test with this custom board. So I ask you to do the necessary modifications, and feel free to modify it anywhere, if you think it's not OK.
Please make sure, that you only add and commit files, that are necessary for the project. You added some *.orig files. Please remove them
I've pulled a local copy of this and will start reviewing it.
Hurray :) My next idea is One-Wire interface over GPIO, and DS18x20 sensor over 1-Wire, but first the CAN :)
Well, I only used the datasheet and the reference guide to get the right calculation, I will write a comment for it. My version contains that version what i sent you in email.
Well, I only used the datasheet and the reference guide to get the right calculation, I will write a comment for it. My version contains that version what i sent you in email
That's fine. I just wanted to know that it's come from a good source and has been tested before I accept it.
It also needs modifications for other microcontroller families, but currently I can only test with this custom board.
I'll organise the source so it only builds on the F1 for now. F4 and F0 support can be added later.
Of course I tested. I tested first(without modification), then seen, there is no change in the returned value (constant 25 °C) but I slightly heated the chip with my solder iron. After that I looked whats happening in the library.
Great, thanks. I'll revisit the algorithms in the F0/F4 ADC code and see if they need your modifications as well.
This generally looks great— any thought given to supporting the secondary "slave" CAN2 peripheral available on some MCUs? I believe they're independent apart from the filter banks, so that's the piece to watch for.
Do we need to clear it in CanInterruptHandler.cpp or the application interrupt handler can do it?
A pending flag should be cleared in CanInterruptHandler.cpp
. Check the other peripheral interrupt handlers for reference.
Dear Mike, Currently i don't have device with 2 CAN interface, and I don't think I will need it in the near future. I took a quick look on the RefMan of the STM32F4x7. As I see, the slave is almost the same as the master, it only differs in CAN filtering. If you need 2 CAN devices, you can simple modify(expand) what I wrote.
I noticed that you did add some CAN2 support in the pull request (for the connectivity line) but because it wasn't complete I removed it. If we can be clear on the differences between CAN1 and CAN2 then I'm happy to make the changes.
B|y the way I noticed that you updated your branch with an example. I hope to get a chance to integrate that into the repo tomorrow.
Tested: sending, receiving, SilentMode, LoopbackMode. Tested ONLY ON STM32F103C8T6 #139