검색결과 리스트
분류 전체보기에 해당되는 글 35건
- 2014.05.19 망고 z1보드 컴파일러 설정 문제
- 2014.04.15 ADC Polling Mode 사용
- 2014.04.13 REMAP 기능 ( PB4 핀 GPIO사용위함) 1
- 2014.04.13 STOP MODE 설정방법
- 2014.04.13 EXTI (외부인터럽트 설정)
- 2014.04.12 Introducing to STM32 ADC programming(Internal Temperature Sensor)
- 2014.04.10 IAR 브레이크 포인트 잡히지 않을때 ???
- 2014.04.09 stm32f103c8 메모리 설정 확인
- 2013.09.07 beagle bone can access the internet by using usb connection of host
- 2013.09.05 Using BeagleBone Black GPIOs read by c
글
망고 z1보드 컴파일러 설정 문제
이번엔 망고 z1으로 zigbee를 이용한 데모보드를 작업하게 되었다.
http://crztech.iptime.org:8080/Release/mango-Z1/src/ 여기서 소스다운로드
http://www.mangoboard.com/ 는 회로도
근디 시작부터 컴파일 에러..헉..... 고객님 당황하셨어요???
IAR 6.1까지는 괜찬은데..난 6.3
요렇게..
결국 설정문제
1. option 에서 General Options -> Library Configuration 에 보면 전에 없던 CMSIS 체크부분이 있습니다 . 이부분을 체크
2. st제공 Libraries\CMSIS\Core\CM3에서 core_m3.c .h 인가 st 라이브러리에 있는 cmsis 파일 지우거나 해야됩니다
끝...
[출처] 라이브러리 컴파일 에러 (Embedded Crazy Boys) |작성자 qyan
[출처] 라이브러리 컴파일 에raries러 (Embedded Crazy Boys) |작성자 qyan
'CPU > STM32F103' 카테고리의 다른 글
ADC Polling Mode 사용 (0) | 2014.04.15 |
---|---|
REMAP 기능 ( PB4 핀 GPIO사용위함) (1) | 2014.04.13 |
STOP MODE 설정방법 (0) | 2014.04.13 |
EXTI (외부인터럽트 설정) (0) | 2014.04.13 |
Introducing to STM32 ADC programming(Internal Temperature Sensor) (0) | 2014.04.12 |
설정
트랙백
댓글
글
ADC Polling Mode 사용
이번엔adc를 폴링 모드로 사용해보자.
32F103C8T6 CPU의 PA0( ADC12_IN0 ) 포트로 전압을 읽어 보자
VREF는 핀수가 많은 칩은 VREF핀이 따로 나오지만 C8칩은 VDDA , VSSA와 VREF가 내부적으로 연결 되어 있따.
설정은 다음과 같다.
1. GPIO 설정
2. CLOCK설정
3. ADC 설정
void ADC2_volt_Configuration(void)
{
ADC_InitTypeDef ADC_InitStructure;
GPIO_InitTypeDef GPIO_InitStructure;
//====================================
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
GPIO_Init(GPIOA, &GPIO_InitStructure);
/* Enable ADC2 and GPIOC clock */
RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC2 , ENABLE);
/* ADC2 configuration ------------------------------------------------------*/
ADC_InitStructure.ADC_Mode = ADC_Mode_Independent;
ADC_InitStructure.ADC_ScanConvMode = DISABLE;
ADC_InitStructure.ADC_ContinuousConvMode = DISABLE;
ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_None;
ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;
ADC_InitStructure.ADC_NbrOfChannel = 1;
ADC_Init(ADC2, &ADC_InitStructure);
/* ADC2 regular channel12 configuration */
ADC_RegularChannelConfig(ADC2, ADC_Channel_0, 1, ADC_SampleTime_41Cycles5);
/* Enable ADC2 */
ADC_Cmd(ADC2, ENABLE);
/* Enable ADC2 reset calibaration register */
ADC_ResetCalibration(ADC2);
/* Check the end of ADC21 reset calibration register */
while(ADC_GetResetCalibrationStatus(ADC2));
/* Start ADC2 calibaration */
ADC_StartCalibration(ADC2);
/* Check the end of ADC1 calibration */
while(ADC_GetCalibrationStatus(ADC2));
}
사용법은 요렇게. VDDA가 3.3V
uint16_t ADC2_vold_Read(void)
{
uint16_t AD_value;
ADC_SoftwareStartConvCmd(ADC2, ENABLE);
//wait for conversion complete
while(!ADC_GetFlagStatus(ADC2, ADC_FLAG_EOC)){}
//read ADC value
AD_value=ADC_GetConversionValue(ADC2);
//clear EOC flag
ADC_ClearFlag(ADC2, ADC_FLAG_EOC);
return AD_value;
}
끝
'CPU > STM32F103' 카테고리의 다른 글
망고 z1보드 컴파일러 설정 문제 (0) | 2014.05.19 |
---|---|
REMAP 기능 ( PB4 핀 GPIO사용위함) (1) | 2014.04.13 |
STOP MODE 설정방법 (0) | 2014.04.13 |
EXTI (외부인터럽트 설정) (0) | 2014.04.13 |
Introducing to STM32 ADC programming(Internal Temperature Sensor) (0) | 2014.04.12 |
설정
트랙백
댓글
글
REMAP 기능 ( PB4 핀 GPIO사용위함)
이번에는 REMAP를 해보겠습니다.
왜 하냐??? PB4핀이 움직이지 않아서 확인 해보았더니...JTAG기능으로 우선되어 있더군요.
NJTRST로 되어 있는 것을 PB4로 사용하기 위해서는 REMAP를 해주어야 합니다.
MCU_GPIO_Configuration();
/* Configure PC13.PA11 in interrupt mode */
EXTI15_10_Config();
GPIO_PinRemapConfig(GPIO_Remap_SWJ_NoJTRST, ENABLE); // it's for PB4 PIN( org is NJTRST pin) , it have to locate last after gpio config.
순서는 GPIO를 초기화 후 마지막에 해주어야 됩니다. 먼저 해주니 움직이지 않는 군요.
경우엔 따라서 JTAG전체 핀을 사용해야 되는 경우도 생기겠죠?
그럴때 아래와 같이
GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable , ENABLE);
요렇게 하거나 아래의 것을 참보하여 하면 됩니다.
#define GPIO_Remap_SWJ_NoJTRST ((uint32_t)0x00300100) /*!< Full SWJ Enabled (JTAG-DP + SW-DP) but without JTRST */
#define GPIO_Remap_SWJ_JTAGDisable ((uint32_t)0x00300200) /*!< JTAG-DP Disabled and SW-DP Enabled */
#define GPIO_Remap_SWJ_Disable ((uint32_t)0x00300400) /*!< Full SWJ Disabled (JTAG-DP + SW-DP) */
아래 디볼트 세팅에 관한 부분입니다. PB4가 기본 JNTRST고 리멥하면 PB4로 쓸수 있는 구조네요...
잘 만들었네요...
그럼
'CPU > STM32F103' 카테고리의 다른 글
망고 z1보드 컴파일러 설정 문제 (0) | 2014.05.19 |
---|---|
ADC Polling Mode 사용 (0) | 2014.04.15 |
STOP MODE 설정방법 (0) | 2014.04.13 |
EXTI (외부인터럽트 설정) (0) | 2014.04.13 |
Introducing to STM32 ADC programming(Internal Temperature Sensor) (0) | 2014.04.12 |
설정
트랙백
댓글
글
STOP MODE 설정방법
이번에는 절전모드인 STOP MODE에 대해 구현해 보기로 한다.
아래 그림에 보듯이 절전을 위한 STOP모드는 3.3V 에서 24uA정도 소비한다.
결론적으로 STOP모드시 GPIO는 OUT 설정된 그대로 유지되지만, PWM은 출력되지 않는다.
STOP WAKEUP은 여러 경우가 있지만 EXTI를 통해서 WAKEUP를 하게 만들었다.
STOP복귀시는 RCC쪽 세팅을 다시 해주어야 하며, 이것만 해주면 모든 주변기기들이 동작한다.
STOP MODE 시작
/* Request to enter STOP mode with regulator in low power mode*/
PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI);
STOP WAKEUP 은 EXIT부분에 신호를 넣어서( 물론 외부 인터럽트 설정은 이전 글을 참조한다)
/* Configures system clock after wake-up from STOP: enable HSE, PLL and select
PLL as system clock source (HSE and PLL are disabled in STOP mode) */
SYSCLKConfig_STOP_Run();
void SYSCLKConfig_STOP_Run(void)
{
/* Enable HSE */
RCC_HSEConfig(RCC_HSE_ON);
/* Wait till HSE is ready */
HSEStartUpStatus = RCC_WaitForHSEStartUp();
if(HSEStartUpStatus == SUCCESS)
{
/* Enable PLL */
RCC_PLLCmd(ENABLE);
/* Wait till PLL is ready */
while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET)
{
}
/* Select PLL as system clock source */
RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);
/* Wait till PLL is used as system clock source */
while(RCC_GetSYSCLKSource() != 0x08)
{
}
}
}
하지만 아래는 어떤 경우 사용되는지 알수 없지만 ST본 소스 초기화 에 설정된내용이나...없어도 동작함을 확인하였다.
//RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR | RCC_APB1Periph_BKP, ENABLE); // power interface clock, backup interface clock
소비전류의 측정은 다음기회에.....
'CPU > STM32F103' 카테고리의 다른 글
ADC Polling Mode 사용 (0) | 2014.04.15 |
---|---|
REMAP 기능 ( PB4 핀 GPIO사용위함) (1) | 2014.04.13 |
EXTI (외부인터럽트 설정) (0) | 2014.04.13 |
Introducing to STM32 ADC programming(Internal Temperature Sensor) (0) | 2014.04.12 |
IAR 브레이크 포인트 잡히지 않을때 ??? (0) | 2014.04.10 |
설정
트랙백
댓글
글
EXTI (외부인터럽트 설정)
위의 보는 것과 같이 외부 인터럽트는 EXTI0-----EXTI15 까지 이고 각 포트의 핀 번호가 인터럽트 핀과 매치된다. ( 그림과 같이 PA0,PB0......가 EXTI0 인터럽트로 연결된다.)
그리고 인터럽트 백터를 보면 EXTI0,1,2,3,4, 5-9, 10-15로 나뉜다. 또한 인터럽트 우선순위는 0부터 높고 10-15가 가장 낮다.
void EXTI0_Config(void)
{
/* Enable GPIOA clock */
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
/* Configure PA.00 pin as input floating */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
GPIO_Init(GPIOA, &GPIO_InitStructure);
/* Enable AFIO clock */
RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);
/* Connect EXTI0 Line to PA.00 pin */
GPIO_EXTILineConfig(GPIO_PortSourceGPIOA, GPIO_PinSource0);
/* Configure EXTI0 line */
EXTI_InitStructure.EXTI_Line = EXTI_Line0;
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising;
EXTI_InitStructure.EXTI_LineCmd = ENABLE;
EXTI_Init(&EXTI_InitStructure);
/* Enable and set EXTI0 Interrupt to the lowest priority */
NVIC_InitStructure.NVIC_IRQChannel = EXTI0_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x0F;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0F;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
}
메인 에서 위의 소스를 초기화 작업한다.
stm32f10x_it.c에서 아래와 같이 백터를 추가한다.
void EXTI0_IRQHandler(void)
{
if(EXTI_GetITStatus(EXTI_Line0) != RESET)
{
/* do something */
/* Clear the EXTI line 0 pending bit */
EXTI_ClearITPendingBit(EXTI_Line0);
}
}
stm32f10x_it.h 에 추가한다.
void EXTI0_IRQHandler(void);
그럼 설정된것 같이 인터럽트가 발생한다.
'CPU > STM32F103' 카테고리의 다른 글
REMAP 기능 ( PB4 핀 GPIO사용위함) (1) | 2014.04.13 |
---|---|
STOP MODE 설정방법 (0) | 2014.04.13 |
Introducing to STM32 ADC programming(Internal Temperature Sensor) (0) | 2014.04.12 |
IAR 브레이크 포인트 잡히지 않을때 ??? (0) | 2014.04.10 |
stm32f103c8 메모리 설정 확인 (0) | 2014.04.09 |
설정
트랙백
댓글
글
Introducing to STM32 ADC programming(Internal Temperature Sensor)
http://www.embedds.com/introducing-to-stm32-adc-programming-part2/
After we had a quick overview of STM32 ADC peripheral we can start digging deeper in to specifics. In order to understand simple things lets go with simplest case – single conversion mode. In this mode ADC does one conversion and then stops. After ADC conversion result is stored in to 16-bit ADC_DR data register (remember that conversion result is 12-bit), then End of Conversion (EOC) flag is set and interrupt is generated if EOCIE flag is set. Same situation is if injected channel is converted. The difference is that result is stored in to corresponding ADC_DRJx register, JEOC flag is set and interrupt generated if JEOCIE flag is set.
In our example we are going to measure the internal temperature sensor value and send it using USART. Temperature sensor is internally connected to ADC1_IN16 channel. Algorithm will start single conversion and wait for conversion complete flag EOC. Then we are going to read ADC value from ADC_DR register, which later will be used to calculate in temperature value in Celsius and sent via USART. So we should see value in terminal screen. As usually we are going to use Standard peripheral library and CMSIS functions. The code for single conversion is pretty short:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | #include "stm32f10x.h" #include "usart.h" #include <stdio.h> uint16_t AD_value; const uint16_t V25 = 1750; // when V25=1.41V at ref 3.3V const uint16_t Avg_Slope = 5; //when avg_slope=4.3mV/C at ref 3.3V uint16_t TemperatureC; int main( void ) { //initialize USART1 Usart1Init(); //enable ADC1 clock RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE); ADC_InitTypeDef ADC_InitStructure; //ADC1 configuration //select independent conversion mode (single) ADC_InitStructure.ADC_Mode = ADC_Mode_Independent; //We will convert single channel only ADC_InitStructure.ADC_ScanConvMode = DISABLE; //we will convert one time ADC_InitStructure.ADC_ContinuousConvMode = DISABLE; //select no external triggering ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_None; //right 12-bit data alignment in ADC data register ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right; //single channel conversion ADC_InitStructure.ADC_NbrOfChannel = 1; //load structure values to control and status registers ADC_Init(ADC1, &ADC_InitStructure); //wake up temperature sensor ADC_TempSensorVrefintCmd(ENABLE); //ADC1 channel16 configuration //we select 41.5 cycles conversion for channel16 //and rank=1 which doesn't matter in single mode ADC_RegularChannelConfig(ADC1, ADC_Channel_16, 1, ADC_SampleTime_41Cycles5); //Enable ADC1 ADC_Cmd(ADC1, ENABLE); //Enable ADC1 reset calibration register ADC_ResetCalibration(ADC1); //Check the end of ADC1 reset calibration register while (ADC_GetResetCalibrationStatus(ADC1)); //Start ADC1 calibration ADC_StartCalibration(ADC1); //Check the end of ADC1 calibration while (ADC_GetCalibrationStatus(ADC1)); //Start ADC1 Software Conversion ADC_SoftwareStartConvCmd(ADC1, ENABLE); //wait for conversion complete while (!ADC_GetFlagStatus(ADC1, ADC_FLAG_EOC)){} //read ADC value AD_value=ADC_GetConversionValue(ADC1); //clear EOC flag ADC_ClearFlag(ADC1, ADC_FLAG_EOC); printf ( "\r\n ADC value: %d \r\n" , AD_value); TemperatureC = (uint16_t)((V25-AD_value)/Avg_Slope+25); printf ( "Temperature: %d%cC\r\n" , TemperatureC, 176); while (1) { //interrupts does the job } } |
Using standard peripheral functions everything becomes obviously simple. First we set enable ADC peripheral clock:
1 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE); |
It is connected to APB2 bus. We aren’t using any prescallers here so it works at 24MHz here.
Next thing is to set up ADC mode using ADC_initstructure. Here we select ADC_Mode_Independent which in our case is single conversion. Then we disable scan mode and continuous scan as we want only single conversion and stop. We also disable any external triggering and select data to be right aligned. In order to access temperature sensor we need to bring it from power down by writing TSVREFE bit in ADC_CR2 register. This is done by using command:
1 | ADC_TempSensorVrefintCmd(ENABLE); |
After ADC is set up and sensor is waked we can configure channel 16. Here we need to set several parameters including channel number, index in group and channel sampling time:
1 | ADC_RegularChannelConfig(ADC1, ADC_Channel_16, 1, ADC_SampleTime_41Cycles5); |
Then we enable ADC:
1 | ADC_Cmd(ADC1, ENABLE); |
After microcontroller is powered on it is recommended to run ADC self calibration. This calculates error correction codes for capacitors and reduces over all error in result.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | //Enable ADC1 reset calibration register ADC_ResetCalibration(ADC1); //Check the end of ADC1 reset calibration register while (ADC_GetResetCalibrationStatus(ADC1)); //Start ADC1 calibration ADC_StartCalibration(ADC1); //Check the end of ADC1 calibration while (ADC_GetCalibrationStatus(ADC1)); |
Now its time to start conversion. The function for this is:
1 | ADC_SoftwareStartConvCmd(ADC1, ENABLE); |
Next thing is to wait for conversion complete by checking for ADC_FLAG_EOC flag in status register:
1 | while (!ADC_GetFlagStatus(ADC1, ADC_FLAG_EOC)){} |
Then we can take ADC value from data register:
1 | AD_value=ADC_GetConversionValue(ADC1); |
After reading temperature sensor we get some 12-bit digital value. In order to calculate temperature we need to use formula:
Temperature = (V25-AD_value)/Avg_slope+25
V25 and Avg_slope values can be found on microcontroller datasheet:
Here we get that V25 is typically 1.41V and Avg_Slope=4.3. When using 3.3V supply as reference we get approximately V25=1750 and Avg_Slope=5. Having these temperature value can be easily calculated:
1 | TemperatureC = (uint16_t)((V25-AD_value)/Avg_Slope+25); |
Don’t actually rely on readings as manufacturer states it can vary from chip to chip up to 45ºC. It can serve only to detect temperature variations inside chip. It is always better to use external sensor for accurate readings.
This is how data looks in terminal screen. First temperature is read normally and second with some heat applied to microcontroller:
This code is only to demonstrate simplest ADC usage. Practically it is Very inefficient because there are loop used for waiting ADC to be complete. There are better ways of doing this like using interrupts or DMA. Next time we will try different ADC mode used in efficient way.
Example source code is here: STM32DiscoveryADCSingle.zip
'CPU > STM32F103' 카테고리의 다른 글
STOP MODE 설정방법 (0) | 2014.04.13 |
---|---|
EXTI (외부인터럽트 설정) (0) | 2014.04.13 |
IAR 브레이크 포인트 잡히지 않을때 ??? (0) | 2014.04.10 |
stm32f103c8 메모리 설정 확인 (0) | 2014.04.09 |
BOOT MODE에 관한 내용 (0) | 2013.06.20 |
설정
트랙백
댓글
글
IAR 브레이크 포인트 잡히지 않을때 ???
'CPU > STM32F103' 카테고리의 다른 글
EXTI (외부인터럽트 설정) (0) | 2014.04.13 |
---|---|
Introducing to STM32 ADC programming(Internal Temperature Sensor) (0) | 2014.04.12 |
stm32f103c8 메모리 설정 확인 (0) | 2014.04.09 |
BOOT MODE에 관한 내용 (0) | 2013.06.20 |
Serial DownLoad방법 (0) | 2013.06.20 |
설정
트랙백
댓글
글
stm32f103c8 메모리 설정 확인
http://harinadha.wordpress.com/tag/iar-embedded-workbench/
'CPU > STM32F103' 카테고리의 다른 글
Introducing to STM32 ADC programming(Internal Temperature Sensor) (0) | 2014.04.12 |
---|---|
IAR 브레이크 포인트 잡히지 않을때 ??? (0) | 2014.04.10 |
BOOT MODE에 관한 내용 (0) | 2013.06.20 |
Serial DownLoad방법 (0) | 2013.06.20 |
STM32 TIM3 PWM MODE (0) | 2013.02.08 |
설정
트랙백
댓글
글
beagle bone can access the internet by using usb connection of host
from : https://groups.google.com/forum/#!topic/beagleboard/k7JkUHCw4Mk
manually configuring BBB for internet access in USB tethered mode?
This is the set of instructions I use every time I plug in my beaglebone. I'm not running angstrom, so you should change the ip address to what ever you have on yours. Also double check your internet connect method. I'm using WLAN0, but you might have ETH0 or whatever.
////===========네트웍이 잘 안되는 경우 dns 서버를 변경한다.
OK, I manually changed the DNS server by editing the /etc/resolv.conf
file to have the line nameserver 208.67.222.222.
/////=====================
'board > beaglebone Black' 카테고리의 다른 글
Using BeagleBone Black GPIOs read by c (0) | 2013.09.05 |
---|---|
BeagleBone Black – Controlling user LEDs using C/C++ (0) | 2013.09.05 |
Using BeagleBone Black GPIOs by bash script (0) | 2013.09.05 |
Using Eclipse to Cross-compile Applications for Embedded Systems 4 (0) | 2013.09.05 |
Using Eclipse to Cross-compile Applications for Embedded Systems 3 (0) | 2013.09.05 |
설정
트랙백
댓글
글
Using BeagleBone Black GPIOs read by c
from : https://gist.github.com/ajmontag/4013192
C program that listens for button presses on a Beaglebone GPIO pin and reports the press duration.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
|
일단 컴파일 혀서 타겟에다가 옮겨 놓습니다.
그러고
# ./filename 60 실행
P9의 12번 핀과 2번핀 사이에 스위치나 저항을 달아서 확인 합니다.
실행화면은 아래와 같이...
root@beaglebone:~# ./press 60
rising edge!
falling edge!
button pressed for 0 ms.
rising edge!
falling edge!
button pressed for 2320 ms.
rising edge!
falling edge!
button pressed for 0 ms.
rising edge!
falling edge!
button pressed for 1 ms.
rising edge!
falling edge!
button pressed for 2226 ms.
rising edge!
falling edge!
button pressed for 0 ms.
rising edge!
falling edge!
button pressed for 1 ms.
rising edge!
falling edge!
button pressed for 1 ms.
rising edge!
falling edge!
button pressed for 0 ms.
rising edge!
falling edge!
button pressed for 0 ms.
rising edge!
falling edge!
button pressed for 1 ms.
rising edge!
falling edge!
button pressed for 2937 ms.
rising edge!
timeout while waiting for falling edge
Button still pressed
timeout while waiting for falling edge
Button still pressed
timeout while waiting for falling edge
Button still pressed
timeout while waiting for falling edge
Button still pressed
timeout while waiting for falling edge
Button still pressed
일단 성공~~~~~~~ 분석은 나중에....
'board > beaglebone Black' 카테고리의 다른 글
beagle bone can access the internet by using usb connection of host (0) | 2013.09.07 |
---|---|
BeagleBone Black – Controlling user LEDs using C/C++ (0) | 2013.09.05 |
Using BeagleBone Black GPIOs by bash script (0) | 2013.09.05 |
Using Eclipse to Cross-compile Applications for Embedded Systems 4 (0) | 2013.09.05 |
Using Eclipse to Cross-compile Applications for Embedded Systems 3 (0) | 2013.09.05 |