Compare commits

...

4 commits

Author SHA1 Message Date
Stephan I. Böttcher
87c50652ff bate: increase timeout 2024-12-02 19:54:39 +01:00
Stephan I. Böttcher
c2ed5387d5 ssp config dac: slow down to 5MHz 2024-12-02 19:53:52 +01:00
Stephan I. Böttcher
bb296e17a6 ssp_busy: ignore SSP_INT_RX 2024-12-02 19:52:28 +01:00
Stephan I. Böttcher
9fc36c938c fix adc/frame/continue 2024-12-02 19:50:22 +01:00
3 changed files with 3 additions and 4 deletions

View file

@ -404,7 +404,7 @@ int adc_frame_cmd(struct command *cmd, const struct command_par *par)
int r = 0; int r = 0;
int n = 1; int n = 1;
if (frame & 0x8000) { if (frame & 0x8000 || !frame) {
if (frame == 0xc000) if (frame == 0xc000)
frame |= ch << 10; frame |= ch << 10;
if (!e) if (!e)

View file

@ -260,7 +260,7 @@ int read_bate(int from_phase, int to_phase, int value, int idx)
case 9: if (phase==to_phase) case 9: if (phase==to_phase)
timeout = value; timeout = value;
else else
timeout = 1000; timeout = 10000;
r = ssp_wait(timeout); r = ssp_wait(timeout);
break; break;
case 3: pressure_reading[3] = pressure_reading[2]; case 3: pressure_reading[3] = pressure_reading[2];

3
ssp.c
View file

@ -256,7 +256,6 @@ unsigned int ssp_busy(void)
const unsigned int mask = 0xffff const unsigned int mask = 0xffff
| (SSPSR_RNE << 16) | (SSPSR_RNE << 16)
| (SSPSR_BSY << 16) | (SSPSR_BSY << 16)
| (SSP_INT_RX << 24)
| (SSP_INT_TX << 24) | (SSP_INT_TX << 24)
; ;
if (c & mask) if (c & mask)
@ -284,7 +283,7 @@ struct ssp_config ssp_confs[] = {
.ssel = SSP_ADS8688, .ssel = SSP_ADS8688,
}, },
{ {
.mode = SSPCR0_16bits | SSP_kHz(30000), .mode = SSPCR0_16bits | SSP_kHz(5000),
.ssel = SSP_LTC2656, .ssel = SSP_LTC2656,
}, },
{ {