NXP Forums
5
Product Forums
21
General Purpose MicrocontrollersGeneral Purpose Microcontrollers
i.MX Forumsi.MX Forums
QorIQ Processing PlatformsQorIQ Processing Platforms
Identification and SecurityIdentification and Security
Power ManagementPower Management
MCX Microcontrollers
S32G
S32K
S32V
MPC5xxx
Other NXP Products
Wireless Connectivity
S12 / MagniV Microcontrollers
Powertrain and Electrification Analog Drivers
Sensors
Vybrid Processors
Digital Signal Controllers
8-bit Microcontrollers
ColdFire/68K Microcontrollers and Processors
PowerQUICC Processors
OSBDM and TBDML
Solution Forums
3
Smart Home
Power & Energy
Mobile Robotics
Software Forums
16
MCUXpresso Software and ToolsMCUXpresso Software and Tools
CodeWarriorCodeWarrior
MQX Software SolutionsMQX Software Solutions
Model-Based Design Toolbox (MBDT)Model-Based Design Toolbox (MBDT)
FreeMASTER
eIQ Machine Learning Software
Embedded Software and Tools Clinic
S32 SDK
S32 Design Studio
Vigiles
GUI Guider
Zephyr Project
Voice Technology
Application Software Packs
Secure Provisioning SDK (SPSDK)
Processor Expert Software
Topics
8
Mobile Robotics - Drones and RoversMobile Robotics - Drones and Rovers
NXP Training ContentNXP Training Content
University ProgramsUniversity Programs
Rapid IoT
NXP Designs
SafeAssure-Community
OSS Security & Maintenance
Using Our Community
Cloud Lab Forums
2
Hardware
Cloud Lab Knowledge Base
Ideas
Blogs
NXP Forums
Ideas
Blog
NXP.COM
Sign In
FAQs
Language
English (US)
日本語 | Japanese
中文 | Chinese (Simplified)
Home
:
Product Forums
:
S12 / MagniV Microcontrollers
:
spi data register
spi data register
All community
This category
This board
Knowledge base
Users
Products
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Show
only
|
Search instead for
Did you mean:
Options
Subscribe to RSS Feed
Mark Topic as New
Mark Topic as Read
Float this Topic for Current User
Bookmark
Subscribe
Mute
Printer Friendly Page
spi data register
04-22-2006
09:24 PM
2,235 Views
lssuer
Contributor I
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report Inappropriate Content
I am trying to send data from one hs12 to another hs12using spi and whenever i write the data to the SPI0DR it doesnt work. It looks like the data never gets written to the register.
Here is my routine firs the setup then the send
void init_spi(void){
DDRS = 0xE2;
SPI0CR1 = 0x50;
SPI0CR2 = 0x00;
SPI0BR = 0x00;
}
void data_transfer(void)
{
// Declare Variables
for (i=0;i5;i++){
PTH &= 0x7F;
SPI0DR = data_array[i];
while (!(SPI0SR & 0x80));
PTH |= 0x80;
}
}
can anybody see or know any reason why this wouldnt send the data or copy the data into the SPI0DR register to be sent.
thanks
Labels
(1)
Labels
Labels:
General
0
Kudos
Reply
All forum topics
Previous Topic
Next Topic
1 Reply
04-24-2006
04:04 PM
351 Views
imajeff
Contributor III
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report Inappropriate Content
Some pointers:
1. The code you posted won't compile, so I know you have not tested it in a simple form.
2. Your selected baud rate is rather fast. Try a fairly slow rate just to make sure that's not the problem.
0
Kudos
Reply
Post Reply
Preview
Exit Preview
never-displayed
You must be signed in to add attachments
never-displayed
Additional options
Associated Products
You do not have permission to remove this product association.