What is the address for sending data to micro sd card?

2018-04-10 18:08:15

I am trying to send the angle calculated(floating) from an external gyroscope sensor connected to a stm32f4 discovery board to a sd card via SPI.

I have the following code for initialization, sending data and receiving data and I am thinking that I can send data and then use the read function to read from the same address and check if both the functions are working properly or not but here is the issue. I do not know what should be the starting address for my micro sd hc card . Also, how should I increment for next angle address if my starting address is 0000 given that previous angle is floating in type(4 bytes).

SPI Initialize Code:

void mySPI_Init(void){

RCC_APB2PeriphClockCmd(RCC_APB2Periph_SPI1, ENABLE);

SPI_InitTypeDef SPI_InitTypeDefStruct;

SPI_InitTypeDefStruct.SPI_Direction = SPI_Direction_2Lines_FullDuplex;

SPI_InitTypeDefStruct.SPI_Mode = SPI_Mode_Master;

SPI_InitTypeDefStruct.SPI_DataSize = SPI_DataSize_8b;

SPI_InitTypeDefStruct.SPI_CPOL = SPI_CPOL_H