TX waveform

70 views
Skip to first unread message

Paulh002

unread,
Aug 22, 2021, 4:48:26 PM8/22/21
to Radioberry
When I analyse the waveform of the radioberry I see some distortion.
First I thought it is because of error in my sdr software but I see also the same distortion with SDRConsole.
I am curious if other people also can see this distortion or may it is only in my setup.

73,
Paul

DS0202.PNG

pa3gsb

unread,
Aug 23, 2021, 12:18:24 PM8/23/21
to Radioberry
Hi Paul,

Also in your private mail you mentioned the non blocking issue.

I assume you have checked SPI ; please uncheck.


73 Johan
PA3GSB

Op zondag 22 augustus 2021 om 22:48:26 UTC+2 schreef paul.hol...@gmail.com:

Paulh002

unread,
Aug 23, 2021, 6:51:52 PM8/23/21
to pa3gsb, Radioberry
Hi Johan,

I have changed the setting, the waveform looks improved with SDRConsole, but the buffer overflow is still not working.
I generate a test tone with software so it is not limited by the sample rate of an audio driver and the radioberry driver seems not to return 0 to indicate a buffer overrun.
I have now added a delay in the test tone to compensate, but I guess the radioberry driver should indicate when a buffer overrun occurs.

73,
Paul 



Op ma 23 aug. 2021 om 18:18 schreef pa3gsb <pa3...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "Radioberry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to radioberry+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/radioberry/c4290cac-6dfb-48f5-b473-0f0bc00e3e07n%40googlegroups.com.

pa3gsb

unread,
Aug 24, 2021, 3:38:37 AM8/24/21
to Radioberry
Paul,

Seems odd... 

It should work.... otherwise a lot of TX distortion occurs. i have added a print statement in the past in the firmware... will check it later.

73 Johan
PA3GSB


driver:
int write_iq_sample(unsigned char tx_iqdata[]){

uint32_t value = 0;
int i = 0;
for (i = 0; i < 4 ; i++) {
if (tx_iqdata[i] & 0x80) *rpi_set_io_high = (1<<17); else *rpi_set_io_low = (1<<17);
if (tx_iqdata[i] & 0x40) *rpi_set_io_high = (1<<5);  else *rpi_set_io_low = (1<<5);
if (tx_iqdata[i] & 0x20) *rpi_set_io_high = (1<<18); else *rpi_set_io_low = (1<<18);
if (tx_iqdata[i] & 0x10) *rpi_set_io_high = (1<<12); else *rpi_set_io_low = (1<<12);
*rpi_set_io_high = (1<<RPI_TX_CLK);
if (tx_iqdata[i] & 0x08) *rpi_set_io_high = (1<<17); else *rpi_set_io_low = (1<<17);
if (tx_iqdata[i] & 0x04) *rpi_set_io_high = (1<<5);  else *rpi_set_io_low = (1<<5);
if (tx_iqdata[i] & 0x02) *rpi_set_io_high = (1<<18); else *rpi_set_io_low = (1<<18);
if (tx_iqdata[i] & 0x01) *rpi_set_io_high = (1<<12); else *rpi_set_io_low = (1<<12);
*rpi_set_io_low = (1<<RPI_TX_CLK);
}
// get the tx fifo state
// if tx fifo is full; than a 0 is returned otherwise 1.
// the sleep is in firmware... i think it should be long here... but delay in kernel mode
// is not working properly....
// to do... i like to solve it in the driver.
value = *rpi_read_io;
return ((value >> 7) & 1);
}


firmware:

if (! write(fd_rb , tx_iqdata , sizeof(tx_iqdata))) {
// tx FIFO is almost full; we give 50 sample time...
// prefer to have this sleep in the driver...did not get it to work properly! 
usleep(1000); //50 samples sleep (1/48K about 20usec /sample * 50)
}


Op dinsdag 24 augustus 2021 om 00:51:52 UTC+2 schreef paul.hol...@gmail.com:
Reply all
Reply to author
Forward
0 new messages