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

LIN protocol implemetation #4

Open
moonglow opened this issue Feb 8, 2021 · 10 comments
Open

LIN protocol implemetation #4

moonglow opened this issue Feb 8, 2021 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@moonglow
Copy link
Owner

moonglow commented Feb 8, 2021

TODO:
LIN protocol implementation stubs, internal message table, internal message scheduler logic

@moonglow moonglow added the enhancement New feature or request label Feb 8, 2021
@moonglow moonglow self-assigned this Feb 8, 2021
@eliocor
Copy link

eliocor commented Feb 8, 2021

Do you want to enhance the FW with also LIN implementation?
If yes, which pins will be used?
I ask because I'm thinking to develop a PCB for the CAN adapter

@moonglow
Copy link
Owner Author

moonglow commented Feb 8, 2021

Do you want to enhance the FW with also LIN implementation?

Yep, I think i will use uart1/uart2 and some pins to do master/slave stuff and so on,it currently in my TODO list only, maybe something be changes in future

@eliocor
Copy link

eliocor commented Feb 8, 2021

  1. Is there any reference schematics (with LIN interface) compatible with the Peak HW?
  2. for CAN FD support, will you ever port the FW to one of this series (STM32G0/STM32G4/STM32H7/STM32L5) which have FD available?
  3. if needed I can develop a prototype board using a microcontroller compatible to point 2). The project will be available to everyone

@Linjieqiang
Copy link

STM32G4 is a good choose for CAN FD support.

@eliocor
Copy link

eliocor commented Feb 8, 2021

OK for the G4 model. Other than:

  • 2x CAN FD
  • 2x LIN (with Master mode Enable each one)
  • 1x USB FS
  • Tag-connect for debugging purpose
  • some LEDs for diagnostics
  • EEPROM for settings (or FLASH in EEPROM emulation?
  • do not think galvanic insulation should be a needed requirement for the first prototype

are there some other requirements?


Is there any way I can directly contact you?

@moonglow
Copy link
Owner Author

moonglow commented Feb 8, 2021

@eliocor

Is there any reference schematics (with LIN interface) compatible with the Peak HW?

Nope, firstly i want to implements all protocol specific thing, hardware realisation it is most easiest part i think, i will add information about it after i finish software part.

for CAN FD support, will you ever port the FW to one of this series (STM32G0/STM32G4/STM32H7/STM32L5) which have FD available?

I already answered to @Linjieqiang for this question, my main goal is CAN-adapter what can be easy to reproduce and works well with Linux and Windows including professional software. Software support is most important thing for such device, that's why i made this project. About FDCAN part, all protocol related thing already implemented and well tested on real hardware, so where is no problem to port it on G series or any other what support FDCAN, but it possible only for custom solution.

if needed I can develop a prototype board using a microcontroller compatible to point

It is good idea, but main disadvantage it is more expensive and required more skill to use it ( soldering, components buying, PCB manufacturing and etc )

Is there any way I can directly contact you?

You can live your e-mail here and i will contact to you, also my profile has public available e-mail too ( i think it must be visible for all registered users )

@dreampet
Copy link

dreampet commented Feb 9, 2021

@eliocor

  • 1x USB FS

Dual-channel CAN FD up to 24 Mbit/s, it needs a USB HiSpeed interface.

@eliocor
Copy link

eliocor commented Feb 9, 2021

You are right: microcontroller MUST be in the STM32H7xx line...

@moonglow
Copy link
Owner Author

moonglow commented Feb 9, 2021

@dreampet

Dual-channel CAN FD up to 24 Mbit/s, it needs a USB HiSpeed interface.

Only in theory, actually FDCAN has slow and fast part of frame + some frame overhead bit + bit stuffing and in real life application you never has non stop bit-stream on 12Mbit speed ( so real speed is slower ), another thing what USB FS 12Mbit is not really 12Mbit too, it is speed of single packet ( MAX is 64byte for FS ) what will transfer from one point to another, and to archive maximum speed we need transfer continuous transfer of data what can't be reached in real application too. Also we have some protocol level overhead... I think for real life application if you use 1 channel it be OK in most cases on hi speed FDCAN buses too.

p.s: i also read your amobbs forum thread, thanx it makes this project very popular ^_^

@eliocor

You are right: microcontroller MUST be in the STM32H7xx line...

You can use also external HS phy for USB as example USB3300, but you must also use external CAN controllers ( as example mcp1517/18 ) becouse ST can't be configured to use HS USB and two CAN on STM32F series.... you no need to use powerfull MCU to do this, but fast USB is good point for 2/4/6 FDCAN channels and other features

@moonglow
Copy link
Owner Author

Implemented here: branch, with some issue described here: #5

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

No branches or pull requests

4 participants