Data Logger BLE Cellular Board
Loading...
Searching...
No Matches
w25q64jv.c File Reference

W25Q64JW Mb Flash Memory (I2C) functions. More...

#include "jfet_files/w25q64jv_Driver.h"
#include <stdio.h>

Go to the source code of this file.

Functions

void readNVFlashxID (uint8_t *flashId)
 reads the NV Flash ID over the SPI bus.
 
void readNVFlashxStatus (uint8_t *flashStatus)
 reads the 3 NV Flash status registers over the SPI bus.
 
void writeNVFlashxStatus (void)
 writes NV Flash status register2 over the SPI bus.
 
void flashxErasePage (uint32_t address)
 erases a 256 byte page over the SPI bus.
 
void flashxEraseBlock1 (uint32_t address)
 erases a 2K block page over the SPI bus.
 
void flashxEraseBlock2 (uint32_t address)
 
void flashxEraseSector (uint32_t address)
 erases a 256K byte sector over the SPI bus.
 
void flashxErase (void)
 erases the entire 8 Mb over the SPI bus.
 
void flashxReadPage (uint32_t address, uint8_t *flashRead)
 reads a 256 byte page over the SPI bus.
 
void flashxWritePage (uint32_t page, uint32_t address, uint8_t *data, uint16_t count)
 writes data to address in serial flash over the SPI bus.
 
void flashxFillPage (uint32_t address, uint16_t data)
 fills a 256 byte page with data over the SPI bus.
 
void flashxClearParameters (void)
 clears/initializes the flash parameters in RAM
 
void displayFlashxParameters (void)
 displays the NV flash parameters.
 
void setFlashxParameters (uint8_t display)
 loads the NV Flash parameters from teh RAM flash parameters
 
void getFlashparameters (void)
 Read the stored flash parameter block from serial flash.
 
int initW25Q64JV (void)
 Initiailizes the W25Q64JW.
 

Detailed Description

W25Q64JW Mb Flash Memory (I2C) functions.

Author
T. J. Mulrooney
See also
W25Q64JW Datasheet

Definition in file w25q64jv.c.

Function Documentation

◆ displayFlashxParameters()

void displayFlashxParameters ( void )

displays the NV flash parameters.

This also first loads the RAM flash parameters from the NV Flash Parameters
so it reloads the RAM flash parameters.

Definition at line 1021 of file w25q64jv.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ flashxClearParameters()

void flashxClearParameters ( void )

clears/initializes the flash parameters in RAM

This is called on power up reset after the NV flash parameters have been erased
from Page 0 1nd 1. only called if the Key is not set in the NV Flash Parameters.

Definition at line 939 of file w25q64jv.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ flashxErase()

void flashxErase ( void )

erases the entire 8 Mb over the SPI bus.

Definition at line 379 of file w25q64jv.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ flashxEraseBlock1()

void flashxEraseBlock1 ( uint32_t address)

erases a 2K block page over the SPI bus.

Parameters
addressaddress of the block to be erased

Definition at line 230 of file w25q64jv.c.

Here is the call graph for this function:

◆ flashxEraseBlock2()

void flashxEraseBlock2 ( uint32_t address)

Definition at line 280 of file w25q64jv.c.

Here is the call graph for this function:

◆ flashxErasePage()

void flashxErasePage ( uint32_t address)

erases a 256 byte page over the SPI bus.

Parameters
addressaddress of the page to be erased

Definition at line 180 of file w25q64jv.c.

Here is the call graph for this function:

◆ flashxEraseSector()

void flashxEraseSector ( uint32_t address)

erases a 256K byte sector over the SPI bus.

Parameters
addressaddress of the sector to be erased

Definition at line 330 of file w25q64jv.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ flashxFillPage()

void flashxFillPage ( uint32_t address,
uint16_t data )

fills a 256 byte page with data over the SPI bus.

Parameters
address24 bit memory address of page to write
databyte to fill in page in NV memory

Definition at line 752 of file w25q64jv.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ flashxReadPage()

void flashxReadPage ( uint32_t address,
uint8_t * flashRead )

reads a 256 byte page over the SPI bus.

Parameters
address24 bit memory address of page to read
flashRead- address of data array to received bytes from NV memory

Definition at line 427 of file w25q64jv.c.

Here is the caller graph for this function:

◆ flashxWritePage()

void flashxWritePage ( uint32_t page,
uint32_t address,
uint8_t * data,
uint16_t count )

writes data to address in serial flash over the SPI bus.

Parameters
page24 bit memory address of page to write
addressaddress within page to begin writing
dataaddress of data array to get bytes to store bytes in NV memory
countnumber of bytes to write

Definition at line 542 of file w25q64jv.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFlashparameters()

void getFlashparameters ( void )

Read the stored flash parameter block from serial flash.

The flash parameter structure is stored in consecutive 256-byte pages. This function reads only the number of pages needed for the current sizeof(flashParametersStruct).

Definition at line 1183 of file w25q64jv.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initW25Q64JV()

int initW25Q64JV ( void )

Initiailizes the W25Q64JW.

This will read the WHO_AM_I value to determine if a W25Q64JW is connected.
It will set SENSORTYPEW25Q64JW if a W25Q64JW is available.

Returns
TRUE if W25Q64JW connected, FALSE if W25Q64JW not connected.

Definition at line 1254 of file w25q64jv.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readNVFlashxID()

void readNVFlashxID ( uint8_t * flashId)

reads the NV Flash ID over the SPI bus.

Parameters
flashIdpointer to the buffer to receive the Flash ID bytes

Definition at line 34 of file w25q64jv.c.

Here is the caller graph for this function:

◆ readNVFlashxStatus()

void readNVFlashxStatus ( uint8_t * flashStatus)

reads the 3 NV Flash status registers over the SPI bus.

Parameters
flashStatuspointer to the buffer to receive the Flash Status bytes

Definition at line 61 of file w25q64jv.c.

Here is the caller graph for this function:

◆ setFlashxParameters()

void setFlashxParameters ( uint8_t display)

loads the NV Flash parameters from teh RAM flash parameters

Parameters
displaytrue to display parameters after the write, false to not display after a write

Definition at line 1122 of file w25q64jv.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeNVFlashxStatus()

void writeNVFlashxStatus ( void )

writes NV Flash status register2 over the SPI bus.

clears teh QSPI bit

Definition at line 127 of file w25q64jv.c.

Here is the call graph for this function: