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

Adamg/flashdrivertest #90

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
44 changes: 44 additions & 0 deletions AvionicsSoftware Debug.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This is an genericBoard board with a single STM32F405RGTx chip
#
# Generated by STM32CubeIDE
# Take care that such file, as generated, may be overridden without any early notice. Please have a look to debug launch configuration setup(s)

source [find interface/stlink-dap.cfg]


set WORKAREASIZE 0x8000

transport select "dapdirect_swd"

set CHIPNAME STM32F405RGTx
set BOARDNAME genericBoard

# Enable debug when in low power modes
set ENABLE_LOW_POWER 1

# Stop Watchdog counters when halt
set STOP_WATCHDOG 1

# STlink Debug clock frequency
set CLOCK_FREQ 8000

# Reset configuration
# use hardware reset, connect under reset
# connect_assert_srst needed if low power mode application running (WFI...)
reset_config srst_only srst_nogate connect_assert_srst
set CONNECT_UNDER_RESET 1
set CORE_RESET 0

# ACCESS PORT NUMBER
set AP_NUM 0
# GDB PORT
set GDB_PORT 3333





# BCTM CPU variables

source [find target/stm32f4x.cfg]

8 changes: 6 additions & 2 deletions AvionicsSoftware.ioc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ADC1.SamplingTime-0\#ChannelRegularConversion=ADC_SAMPLETIME_28CYCLES
ADC1.ScanConvMode=DISABLE
ADC1.master=1
ADC2.Channel-68\#ChannelRegularConversion=ADC_CHANNEL_10
ADC2.ClockPrescaler=ADC_CLOCK_SYNC_PCLK_DIV2
ADC2.ClockPrescaler=ADC_CLOCK_SYNC_PCLK_DIV4
ADC2.ContinuousConvMode=ENABLE
ADC2.DMAContinuousRequests=DISABLE
ADC2.DataAlign=ADC_DATAALIGN_RIGHT
Expand Down Expand Up @@ -351,10 +351,13 @@ ProjectManager.PreviousToolchain=STM32CubeIDE
ProjectManager.ProjectBuild=false
ProjectManager.ProjectFileName=AvionicsSoftware.ioc
ProjectManager.ProjectName=AvionicsSoftware
ProjectManager.ProjectStructure=
ProjectManager.RegisterCallBack=
ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=STM32CubeIDE
ProjectManager.ToolChainLocation=
ProjectManager.UAScriptAfterPath=
ProjectManager.UAScriptBeforePath=
ProjectManager.UnderRoot=true
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-true,3-MX_DMA_Init-DMA-false-HAL-true,4-MX_SPI1_Init-SPI1-false-HAL-true,5-MX_USART2_UART_Init-USART2-false-LL-true,6-MX_UART4_Init-UART4-false-HAL-true,7-MX_CRC_Init-CRC-false-HAL-true,8-MX_SPI3_Init-SPI3-false-HAL-true,9-MX_UART5_Init-UART5-false-LL-true,10-MX_ADC2_Init-ADC2-false-HAL-true,11-MX_SPI2_Init-SPI2-false-HAL-true,12-MX_TIM2_Init-TIM2-false-HAL-true,13-MX_USART1_UART_Init-USART1-false-LL-true,14-MX_USART3_UART_Init-USART3-false-LL-true,15-MX_ADC1_Init-ADC1-false-HAL-true
RCC.48MHZClocksFreq_Value=84000000
Expand Down Expand Up @@ -445,4 +448,5 @@ VP_SYS_VS_tim1.Signal=SYS_VS_tim1
VP_TIM2_VS_ClockSourceINT.Mode=Internal
VP_TIM2_VS_ClockSourceINT.Signal=TIM2_VS_ClockSourceINT
board=VanderAvionics
isbadioc=false
rtos.0.ip=FREERTOS
isbadioc=true
1 change: 1 addition & 0 deletions Components/Core/Queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ bool Queue::SendToFront(Command& command)
if (xQueueSendToFront(rtQueueHandle, &command, DEFAULT_QUEUE_SEND_WAIT_TICKS) == pdPASS)
return true;


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleanup empty lines

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this white space

SOAR_PRINT("Could not send data to front of queue!\n");
command.Reset();

Expand Down
2 changes: 2 additions & 0 deletions Components/Flash/Driver/SPIFlash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ class SPIFlash : public Flash
return true;
}



Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this white space

/**
* @brief Read data from flash memory at specified offset
* @param offset offset at which to read data
Expand Down
2 changes: 2 additions & 0 deletions Components/Flash/Driver/w25qxx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,8 @@ void W25qxx_WriteByte(uint8_t pBuffer, uint32_t WriteAddr_inBytes)
#endif
w25qxx.Lock = 0;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove one line from this whitespace


//###################################################################################################################
void W25qxx_WritePage(uint8_t *pBuffer, uint32_t Page_Address, uint32_t OffsetInByte, uint32_t NumByteToWrite_up_to_PageSize)
{
Expand Down
1 change: 1 addition & 0 deletions Components/Flash/Driver/w25qxx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ extern "C"
void W25qxx_WritePage(uint8_t *pBuffer, uint32_t Page_Address, uint32_t OffsetInByte, uint32_t NumByteToWrite_up_to_PageSize);
void W25qxx_WriteSector(uint8_t *pBuffer, uint32_t Sector_Address, uint32_t OffsetInByte, uint32_t NumByteToWrite_up_to_SectorSize);
void W25qxx_WriteBlock(uint8_t *pBuffer, uint32_t Block_Address, uint32_t OffsetInByte, uint32_t NumByteToWrite_up_to_BlockSize);
void W25qxx_WritePageScary(uint8_t *pBuffer, uint32_t Page_Address);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change IDE to 4-space tabs, get rid of this function declaration unless it's used somewhere

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the name. Dont have it as Write scary page, unless it means something


void W25qxx_ReadByte(uint8_t *pBuffer, uint32_t Bytes_Address);
void W25qxx_ReadBytes(uint8_t *pBuffer, uint32_t ReadAddr, uint32_t NumByteToRead);
Expand Down
Loading