cancel
Showing results for 
Search instead for 
Did you mean: 

Distinguish setup CubeMx for Keil

A.Rade.96
Associate III

Hello my friends, why is not generated setup from CubeMx for my Keil, why is distinguish setup ?12345678.png

This discussion is locked. Please start a new topic to ask your question.
1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

In the register fields that control these timings, a value of 0 means 1 HCLK cycle, hence the difference of 1.

TDK_0-1691063931571.png

Except for MEMHOLD which is the same:

TDK_1-1691063970614.png

 

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

6 REPLIES 6
TDK
Super User

In the register fields that control these timings, a value of 0 means 1 HCLK cycle, hence the difference of 1.

TDK_0-1691063931571.png

Except for MEMHOLD which is the same:

TDK_1-1691063970614.png

 

If you feel a post has answered your question, please click "Accept as Solution".

Thanks a lot, this is user manual cubemx?

 

This is from a reference manual for the STM32F4 series.

Please mark a reply as the solution if you find that it answered the question, it helps close it out and lets others find it more easily.

If you feel a post has answered your question, please click "Accept as Solution".

Thanks a lot to you help me, but i'm interested how to testing write and read my nand memory. My code is below this message, but me return always false.

oid NAND_WriteRead_Test(void)
{
  NAND_AddressTypeDef  page_address; 
  page_address.Block = 0;
page_address.Page = 0;
page_address.Plane = 0;
 
  // Filling the buffer with test data
  for (uint32_t i = 0; i < BUFFER_SIZE; i++)
  {
    write_buffer[i] = i % 256;
  }
 
  // Writing data to NAND memory
  HAL_NAND_Write_Page_8b(&hnand2, &page_address, write_buffer, BUFFER_SIZE);
 
  // Reading data from NAND memory
  HAL_NAND_Read_Page_8b(&hnand2, &page_address, read_buffer, BUFFER_SIZE);
 
  // Checking whether the entered and read data are the same
  if (memcmp(write_buffer, read_buffer, BUFFER_SIZE) == 0)
  {
    // The data was entered and read correctly
FlagNand = true;
  }
  else
  {
    // Errors when writing or reading data
   FlagNand = false;
  }
}
TDK
Super User

First thing to check would be to see if HAL_NAND_Write_Page_8b is returning an error code.

Note that last parameter to this function is the number of PAGES to write, not the number of BYTES.

If you feel a post has answered your question, please click "Accept as Solution".

Not return error, return HAL_OK for Write and Read return HAL_OK. Problem is arises to if loop is return else "FlagNand = false" . I don't understand why is false return!?