aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-03-06 11:40:55 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-03-06 11:40:55 +0000
commitff29b4539f662595fd6962d90dba18477a20aec2 (patch)
tree7a1cc0d42fe4cb02bc762ccdf1b49e13cacab2af /os/hal
parente1868bc0b1a52cf22a2684595afca26dc8814550 (diff)
downloadChibiOS-ff29b4539f662595fd6962d90dba18477a20aec2.tar.gz
ChibiOS-ff29b4539f662595fd6962d90dba18477a20aec2.tar.bz2
ChibiOS-ff29b4539f662595fd6962d90dba18477a20aec2.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5368 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/platforms/SPC5xx/EQADC_v1/adc_lld.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/os/hal/platforms/SPC5xx/EQADC_v1/adc_lld.c b/os/hal/platforms/SPC5xx/EQADC_v1/adc_lld.c
index 2a27c62f7..75bca5fe3 100644
--- a/os/hal/platforms/SPC5xx/EQADC_v1/adc_lld.c
+++ b/os/hal/platforms/SPC5xx/EQADC_v1/adc_lld.c
@@ -652,6 +652,9 @@ void adc_lld_stop(ADCDriver *adcp) {
/**
* @brief Starts an ADC conversion.
+ * @note Because an HW constraint the number of rows in the samples
+ * array must not be greater than the preconfigured value in
+ * the conversion group.
*
* @param[in] adcp pointer to the @p ADCDriver object
*
@@ -661,6 +664,9 @@ void adc_lld_start_conversion(ADCDriver *adcp) {
edma_tcd_t *ctcdp = edmaGetTCD(adcp->cfifo_channel);
edma_tcd_t *rtcdp = edmaGetTCD(adcp->rfifo_channel);
+ chDbgAssert(adcp->grpp->num_iterations >= adcp->depth,
+ "adc_lld_start_conversion(), #1", "too many elements");
+
/* TODO: ISEL0, ISEL3 setup for HW triggers.*/
/* Updating the variable TCD fields for CFIFO.*/