페이지

글목록

레이블이 da1458x인 게시물을 표시합니다. 모든 게시물 표시
레이블이 da1458x인 게시물을 표시합니다. 모든 게시물 표시

2016년 4월 2일 토요일

[dialog] 긴 device Name을 사용하는 방법 (SPI 메모리 사용시)

이번에 DA14583 으로 제작한 DSPS BLE 모듈에 Device 이름과 MAC Address를 바꿀 상황이 생겨서 
프로그램을 수정하면서 알게된 내용입니다.

SPI Flash 나 JTAG Debug로 RAM에 프로그램을 하는 경우,
Device Name 과 MAC Address 를 수정하는 곳은 nvds.c 파일 입니다.

이 파일에서 다음과 같은 부분을 수정해 주면 됩니다.
const struct nvds_data_struct nvds_data_storage __attribute__((section("nvds_data_storage_area"))) 구조체의 내용인

 //   .NVDS_TAG_DEVICE_NAME                   = "DA1458x",
    .NVDS_TAG_DEVICE_NAME                   = "FiSi Signage",
 //   .NVDS_TAG_BD_ADDRESS                    = {0x01, 0x00, 0x00, 0xCA, 0xEA, 0x80},
    .NVDS_TAG_BD_ADDRESS                    = {0x01, 0x00, 0x00, 0x00, 0x34, 0x12}, // MAC Address 01
    .ADV_DATA_TAG_LEN                       = 27,
    .SCAN_RESP_DATA_TAG_LEN                 = 10,
//    .DEVICE_NAME_TAG_LEN                    = 7,
    .DEVICE_NAME_TAG_LEN                    = 12,

그런데, NVDS.C 파일에서 DEVICE NAME 수정 (길이를 늘렸는데 다 안나옴-8Byte만 나옴)

여기저기 인터넷을 찾아본 결과 (링크)
app_sps_device_project.h 파일에서 다음과 같이 바꿈

#define APP_DFLT_ADV_DATA        "\x11\x07\xb7\x5c\x49\xd2\x04\xa3\x40\x71\xa0\xb5\x35\x85\x3e\xb0\x83\x07"
#define APP_DFLT_ADV_DATA_LEN    (18)
을 다음과 같이 수정
#define APP_DFLT_ADV_DATA        "\x04\xFFHi!"
#define APP_DFLT_ADV_DATA_LEN    (5)

(위의 내용의 설명)
A BLE advertisement package can actually  carry 31bytes of payload in addition to the 6bytes Bluetooth Device Address - total of 37bytes.

In the DSPS implementation, 3 bytes are used for flags and 18 bytes are used for a unique service ID (includes one byte for length and one byte for type). This leaves 10bytes for the length of the name (1 byte), the data type of the name (1byte) and the name itself. As you can see this limits the name to 8bytes/characters.

But don't panic ;o)

You don't have to put a unique service ID in the advertising data. You can just go ahead and remove it. In app_sps_device_project.h change 
#define APP_DFLT_ADV_DATA        "\x11\x07\xb7\x5c\x49\xd2\x04\xa3\x40\x71\xa0\xb5\x35\x85\x3e\xb0\x83\x07"
#define APP_DFLT_ADV_DATA_LEN    (18)
to
#define APP_DFLT_ADV_DATA        "\x04\xFFHi!"
#define APP_DFLT_ADV_DATA_LEN    (5)

This changes the advertised data to a manufacturer specific data set of the phrase "Hi!". And you can extend the Bluetooth Device name in NVDS like this:

2016년 2월 11일 목요일

[dialog] DA14580 다이얼로그사 BLE용 Cortex-M0

안녕하세요,

이번엔 다이얼로그사의 BLE 용 Cotex M0 를 소개합니다.

개발 툴은 좀 비싼것을 회사에서 샀죠. Expert 였나?
찾아 보니 Expert 맞네요.

BLE용 IC는 DA-14580 입니다. 현재 DA-14581,14582,14583,14680 까지 총 5개의 제품이 나와 있습니다.

개발자용 웹사이트 주소는 다음과  같습니다.

위 사이트 가서 회원가입하고 승인이 떨어져야, 여러가지 문서와 압축 화일을 받을 수 있기 때문에
자료를 함부로 올릴 수는 없겠습니다.

좀 폐쇄적인데,왜 이렇게 운영을 하는지 모르겠는데요.. 흠.. 

앞으로 개발자 사이트 외에 구글링해서 공개된 자료나 텍스트로와 링크로만 글을 작성해야 할 것 같습니다. 

아, 일반에게 공개된 사이트가 또 있는데..
자료가 좀 제한적이긴 합니다. 



각각의 칩의 Feature 만 두고 차이를 알아볼까요?

[ DA-14580 ]
  • Complete Bluetooth® Smart SoC (4.1 specification)
  • 32-bit ARM Cortex M0 microcontroller
  • Radio current consumption: 4.9 mA RX / TX at 3 V at 0 dBm output power
  • Under 600 nA sleep mode
  • -93 dBm Rx sensitivity
  • 0.9 – 3.45 V operating range
  • Single-pin antenna interface
  • Up to 32 GPIOs
  • Supporting Software Upgrade Over The Air (SUOTA)

[ DA-14581 ]
  • Bluetooth® Smart (4.1 specification)
  • Cortex M0 application processor
  • Power supply 0.9 – 3.6 V
  • Single pin RF I/O
  • Rich set of analog and digital peripherals
  • 8 connections
  • Optimized boot time
  • Supporting Software Upgrade Over The Air (SUOTA)
da-14580 과 다른 점은 
- Power supply 0.9 – 3.6 V
- Rich set of analog and digital peripherals
- 8 connections
- Optimized boot time

[ DA-14582 ]
  • Bluetooth 4.1
  • Cortex M0 application processor
  • Power supply 2.35 -3.3 V
  • Single pin RF I/O
  • Rich set of analog and digital peripherals
  • Wideband analog codec input and output
  • Compatible with FR1-type PCB
  • Supporting software upgrade Over The Air (OTA)
da-14581 과 다른 점은 
- Power supply 2.35 – 3.3 V
- Wideband analog codec input and output
- Compatible with FR1-type PCB
- Supporting software upgrade Over The Air (OTA)

[ DA-14583 ]
  • Bluetooth 4.1
  • Cortex M0 application processor
  • 1 Mb Flash
  • Power supply 2.35 -3.3 V
  • Single pin RF I/O
  • Rich set of analog and digital peripherals
  • Supporting software upgrade Over The Air (OTA)
da-14582 과 다른 점은 
1 Mb Flash


[ DA-14680 ]
  • Bluetooth 4.2
  • Cortex M0 application processor
  • Dedicated HW crypto engine
  • Integrated battery and system PMU
  • Power supply 1.7 -5 V
  • Single pin RF I/O
  • Rich set of analog and digital peripherals
  • 8 Mb executable Flash
da-14583 과 다른 점은 
- Bluetooth 4.2
- Dedicated HW crypto engine
- Integrated battery and system PMU
- Power supply 1.7 -5 V
- 8 Mb executable Flash



전체적으로 봤을 때,
1. DA14580 에서 P1.2,P1.3 을 빠르게 토글하면 통신상 이상이 있던 점이 이후 버전부터 수정되었고,
2. power supply 가 0.9V~3.6V 에서 중간에 2.35V~3.3V 로 갔다가 최종 1.7V~5V 로 바뀌었네요.
3. 내부 프로그램 메모리가 OTP에서 플레쉬로 DA-14583 부터 바뀌었고요,
4. DA-14680에서 bluetooth 4.2로 바뀌네요.