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

SD card status unclear #28

Closed
rusefillc opened this issue Feb 18, 2023 · 10 comments
Closed

SD card status unclear #28

rusefillc opened this issue Feb 18, 2023 · 10 comments
Assignees
Labels

Comments

@rusefillc
Copy link
Contributor

SD card does not show as MSD

could be rusefi/rusefi#5097

@rusefillc
Copy link
Contributor Author

rusefillc commented Feb 19, 2023

  • something is not great with board PDF - search for "SD_CS" does not find me SD_CS text
    when I search for MOSI at least I see SD_MOSI but I only see it once, how do I know where is SD card connected to?!

Overall at the moment both mm-01 and mm-02 I have not seen SD card working. What is SD_CS pin just to confirm @Qwerty-OFF ?

image

@Qwerty-OFF
Copy link
Collaborator

Use SPI1 with PB6 CS

@rusefillc
Copy link
Contributor Author

@Qwerty-OFF where can I see this on the PDF?

rusefillc pushed a commit to rusefi/rusefi that referenced this issue Feb 19, 2023
@rusefillc
Copy link
Contributor Author

rusefillc commented Feb 19, 2023

just changed to SPI1 and still does not work

2023-02-19_13_49_52_243: EngineState: pin PB3: SPI clock
2023-02-19_13_49_52_247: EngineState: pin PB4: SPI master in 
2023-02-19_13_49_52_248: EngineState: pin PB5: SPI master out
2023-02-19_13_49_52_249: EngineState: pin PB6: SD CS

image

@rusefillc
Copy link
Contributor Author

PDF search issue starts at hellen-one/modules/mega-mcu144/0.2/mega-mcu144-schematic.pdf

if I search for "_mosi" it gives me ACC_MOSE spi1_mosi spi2_mosi spi3_mosi but nothing about SD

@rusefillc
Copy link
Contributor Author

Good news SD card lines are going at least somewhere :)

image

@andreika-git
Copy link

andreika-git commented Feb 24, 2023

We had an external hardware pull-up on SPI1-MOSI because sometimes we needed +5V compatibility and enabled software OPEN-DRAIN mode on MOSI pin:

mcu144:

image

@rusefillc
Copy link
Contributor Author

rusefillc commented Feb 26, 2023

2chan
image

@dron0gus
Copy link
Member

"I'm not going to have per-board board.c file."
All f4 boards use some random board.c file from STM F4 Discovery board https://github.com/rusefi/rusefi/blob/d1e35213c66ddfc15cd502b980102abe0b2af917/firmware/hw_layer/ports/stm32/stm32f4/hw_ports.mk#L11
__early_init() is also used from this file. It calls stm32_gpio_init() that is again Discovery-board-specific.
This function set PA5, PA6, PA7 for SPI1 function.
Does any other code reset SPI1 function for these pins before setting PB3, PB4, PB5?

@rusefillc
Copy link
Contributor Author

@dron0gus same nothing :(

image

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

No branches or pull requests

4 participants