Sorry, the file I posted before was not the one I was using. I am using ChibiOS\os\hal\ports\STM32\LLD\SPIv2\hal_i2s_lld.h, but the problem I'm describing is still the same:
Trying to fit this from main.c :
...
Into this: (original comments removed to make it easier to see the types)
ChibiOS\os\hal\ports\STM32\LLD\SPIv2\hal_i2s_lld.h
typedef struct {
const void *tx_buffer; //(1) tx pointer
void *rx_buffer; //(2) rx pointer
size_t size; //(3) size_t
i2scallback_t end_cb; //(4) i2scallback end_cb pointer
int16_t i2scfgr; //(5) i2scfgr int16
int16_t i2spr; //(6) i2spr int16
} I2SConfig;
It might work anyway. Or it might compile, but not be what was intended being stuffed in there. I haven't tried to analyze it much more than that. This is why I got the compiler error. There are 7 elements in the initializer, but the struct definition only has 6 elements. Am I missing something here?
Anyway, I'll leave it at that. I reverted all the changes I made from previous versions of the repository (when I first got the device). Everything from the current repository state compiles (I haven't tested an image this way yet) with gcc 7.xx, but not this error.
Your .h file and the .h file I have are not the same or I am looking at the wrong file, which is possible.
typedef struct {
/**
* @brief Transmission buffer pointer.
* @note Can be @p NULL if TX is not required.
*/
const void *tx_buffer;
/**
* @brief Receive buffer pointer.
* @note Can be @p NULL if RX is not required.
*/
void *rx_buffer;
/**
* @brief TX and RX buffers size as number of samples.
*/
size_t size;
/**
* @brief Callback function called during streaming of TX.
*/
i2scallback_t tx_end_cb;
/**
* @brief Callback function called during streaming of RX.
*/
i2scallback_t rx_end_cb;
/* End of the mandatory fields.*/
/**
* @brief Configuration of the I2SCFGR register.
* @details See the STM32 reference manual, this register is used for
* the I2S configuration, the following bits must not be
* specified because handled directly by the driver:
* - I2SMOD
* - I2SE
* - I2SCFG
* .
*/
int16_t i2scfgr;
/**
* @brief Configuration of the I2SPR register.
* @details See the STM32 reference manual, this register is used for
* the I2S clock setup.
*/
int16_t i2spr;
} I2SConfig;
Lastest firmware from edy555, showing 1700 sweeps, not a single glitch. I have no idea if the software has other problems or improvements as I am only looking at this one test case. I'll play around with this version of code as time permits.
Is it possible to rotate graph such a way to properly read vertical scale? Seems like it is more than 0dB at around 880MHz.. What is this? Measurement of bandpass filter or just noise floor? If noise floor then I'll pass on such VNA
Sure I can rotate to show the scale. You are correct, this is indeed a BP filter. I'm really just looking for the Nano to send up some corrupt data. I'll try running a few other tests with it. This version does appear a little slower (I am not currently measuring the Nano's response time) which I guess would make some sense if they are slowing down the scan to make it more stable.