ATmega328P-PU (8MHz) with microSD card module (Card won't initialize)

Hello everyone,
I have a problem with my Atmega, it runs at 8MHz internal clock and when I connect the SDcard module it won't initialize even in simple write/read program. When I try card info program, serial link sent a message that wiring is correct and a card is present but partition fat16/32 is not there.
But also I formatted partition and SD card is FAT32.
Could there be some issues with 8MHz internal clock because of SPI? or what should go wrong? If I connect the module to Arduino Uno board it runs fine.
Maybe helps if I slow down SPI speed to half and if yes how can I do that?

Thanks in advance.

Jaroslav01:
Maybe helps if I slow down SPI speed to half and if yes how can I do that?

I have no clue whether it would help, but you can set the max SPI clock via SPISettings:

Although they are not so common, there are quite a few 8 MHz boards out there and I haven't seen reports of them not working with SD, so I'm a bit doubtful the problem is the clock speed. I am more suspicious of the use of the less accurate internal oscillator. The common 8 MHz boards use an external clock source and the use of the internal oscillator is more often only on relatively scarce DIY boards. The calibration of the internal oscillator will vary from one chip to another so we only see it cause serious problems on the outlier chips that are farther off calibration. However, I'm not sure clock accuracy is an issue with SPI, since it has a clock pin. I don't know enough on the subject to do anything more than speculate, but since you didn't get any other replies before now I thought maybe some wild brainstorming might chance to set you on the right path.

SPI is not clock sensitive, the master always supplies the clock, the slave must use that clock or get garbage. SPI is a pseudo synchronous transfer ie. the master clock can vary and the slave must follow it by definition. I would test the card and be sure it is a known good. If it is good try another brand of SD card, they are not all the same. As far as slowing the SPI clock that is the first thing to try then so not speed it up until everything is working properly. Also there are several modes the SPI operates in, are you using the correct one, if not sure try the others. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil