Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serial ports on cc111x #15

Open
dclovesdc1 opened this issue Feb 6, 2017 · 9 comments
Open

serial ports on cc111x #15

dclovesdc1 opened this issue Feb 6, 2017 · 9 comments

Comments

@dclovesdc1
Copy link

working with edison, explorer and pingrf sw. My understanding is that when connecting to edison, spi would be the primary communication path. Are the serial ports on cc111x wired to communicate with edison in addition? Trying to see what would be a good way to print out debug prints from firmware. Thanks.

@mogar mogar added the question label Feb 7, 2017
@mogar
Copy link
Contributor

mogar commented Feb 7, 2017

If you're using the subg_rfspy firmware as a basis, you can use the spi_serial library for debug print statements. You'll just have to poll the spi bus using spi_serial on the Edison.

The SPI interface on the CC1110 is USART1, which can also be used as a UART if you want. UART1/UART uses P1.6 and P1.7 as TX and RX, respectively. If you want to use UART0 instead, USART0/UART uses P1.4 and P1.5 as TX and RX, respectively.

@mogar mogar closed this as completed Feb 7, 2017
@dclovesdc1
Copy link
Author

dclovesdc1 commented Feb 7, 2017 via email

@dclovesdc1
Copy link
Author

dclovesdc1 commented Feb 7, 2017 via email

@mogar
Copy link
Contributor

mogar commented Feb 8, 2017

On the Edison, the pins those are connected to are set up as SPI. You could implement a software serial library to handle them though. For Edison pin information, check out the mraa guide here: https://iotdk.intel.com/docs/master/mraa/edison.html

You could also try getting spi_serial working with pingrf. Check out the spi1_alt2 code in subg_rfspy to see how that works. Then you could use the pingrf firmware with our spi_serial Edison library.
https://github.com/EnhancedRadioDevices/subg_rfspy/tree/master/spi1_alt2

@dclovesdc1
Copy link
Author

dclovesdc1 commented Feb 8, 2017 via email

@mogar
Copy link
Contributor

mogar commented Feb 10, 2017

Unfortunately, the serial port and the SPI port use the same pins. You'll have to choose one or the other. We can look into opening up the other UART on the next hardware revision.

@mogar mogar reopened this Feb 10, 2017
@dclovesdc1
Copy link
Author

dclovesdc1 commented Feb 11, 2017 via email

@dclovesdc1
Copy link
Author

dclovesdc1 commented Feb 14, 2017 via email

@mogar
Copy link
Contributor

mogar commented Feb 20, 2017

The CC1110 comms pins are connected to a SPI port on the Edison. You can interface with those pins as GPIO, but I don't think they have a hardware serial port attached to them. You'd need to write a software serial driver that manages those pins as GPIO. That shouldn't be too tough if you just set up interrupts on the RX pin.

To see how to set the CC1110 comms pins in different modes, take a look at the subg_rfspy source:
https://github.com/EnhancedRadioDevices/subg_rfspy

Specifically, the code in the spi1_alt2 directory sets up the pins as a SPI bus. You can also build the project with uart0 or uart1 enabled. The makefile should show you how to do that.

Take a look at the schematic for pin connections between the CC1110 and the Edison:
https://github.com/EnhancedRadioDevices/915MHzEdisonExplorer/blob/master/EdisonBlock_915MHz_fab/EdisonBlock_915MHz.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants