Closed darksidelemm closed 1 year ago
Was is this document? I'll update the README. SA868-open.pdf
Yep, that was it! That also pretty much confirms my suspicions, that the PD, SQ, etc lines are all just going to the microcontroller, so that means that things like detection of an active signal are going to have to be done by regularly polling a register in the radio chip.
I'm guessing that in the original design the GPIO 0/6/7 pins from the radio (which go to the microcontroller) were configured to provide some indication of these states? I can see some discussion in the register sets in your python code which indicates this is the case, but I'm guessing these are not currently passed through by the microcontroller.
I also see in the schematic that when going into RX mode, the RXEN line will need to be set high to enable the RX transistor Q2. This line is set from the microcontroller, so this might be an extra command that will need to be added? You'd also need to be extremely careful to ensure that this isn't set when in transmit mode, else you'd probably blow up the receive circuitry.
I'm guessing that in the original design the GPIO 0/6/7 pins from the radio (which go to the microcontroller) were configured to provide some indication of these states? I can see some discussion in the register sets in your python code which indicates this is the case, but I'm guessing these are not currently passed through by the microcontroller.
That's right, it was also unclear to me when I read the programming guide about how to best use those GPIOs so they've been omitted until necessary.
I also see in the schematic that when going into RX mode, the RXEN line will need to be set high to enable the RX transistor Q2. This line is set from the microcontroller, so this might be an extra command that will need to be added? You'd also need to be extremely careful to ensure that this isn't set when in transmit mode, else you'd probably blow up the receive circuitry.
This should be covered by issue #2. I believe the RXEN line is toggled depending on the state of the external PTT input. Maybe it's still a good idea to be able to control it from commands if there's a desire to run the module without the PTT GPIO. Somehow I haven't destroyed a module yet, which has me wondering if the schematics are complete or not. For example, it's not clear what the purpose of TXEN is since the flag doesn't connect to any other nets. Most of my work was actually reverse engineered from an earlier version of the module for which there were no schematics available.
If you look at the schematic, the TXEN net is connected to the PABIAS pin on the RDA chip, which is set with register 0x0A. I'm guessing this only becomes active in TX mode though. I see in your example python code that register is being set, but interestingly there's different values used for 12.5 kHz vs 25 kHz bandwidth? I'm assuming these register values are sniffed from the closed SA868 firmware?
TXEN is a global flag but there's nothing else attached to it. Maybe it's just used as a label, but I would expect there to be at least one other occurence of TXEN in the document. The Python example is mostly ported from the OpenRTX MD-UV380 driver and there are only a couple register differences.
Yeah i think it's just there in the schematic as a label, and is just enabled by that PABIAS line.
OK on where the register values came from. Control over the RXEN line is probably going to be the most important thing to be extremely careful with on this module. Definitely potential for damage if you set the module into TX via a register call with that line set.
If we will take a close look on the SA868 photo from this blog: https://www.egimoto.com/a/17cf8552e5016036
- we can see that 1) L15 , L19 and L20 are substituted by 0R resistors 2) C52, C53 and C54 are missing
if the filter is not implemented - I wonder, are there any true differences between these
variants on the module ?
Thanks for sharing this information. I also have this impression and would like to get an explanation from NiceRF.
I vaguely recall seeing a schematic of the SA868 module (what's going on inside it!) somewhere, but I can't find it again.
It would be good to have this linked to from this repository, as knowing what connects to what is pretty important when developing firmware!